Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Timecount.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       Timecount.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose: Count and log elapsed time for debug purpose
00019 
00020 /-*/
00021 #ifndef Timecount_h
00022 #define Timecount_h
00023 
00024 #include <iosfwd>
00025 #include <string>
00026 
00027 #include <y2util/Date.h>
00028 
00030 //
00031 //      CLASS NAME : Timecount
00035 class Timecount {
00036 
00037   Timecount & operator=( const Timecount & );
00038   Timecount            ( const Timecount & );
00039 
00040   private:
00041 
00042     time_t      _start;
00043     std::string _msg;
00044 
00045   public:
00046 
00050     Timecount( const char * msg_r = 0, const bool autostart_r = true );
00051 
00055     ~Timecount();
00056 
00060     void start( const char * msg_r = 0 );
00061 
00065     void stop();
00066 };
00067 
00069 
00070 #endif // Timecount_h

Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6