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

TimeStamp.hh

Go to the documentation of this file.
00001 /*
00002  * TimeStamp.hh
00003  *
00004  * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
00005  * Copyright 2001, Bastiaan Bakker. All rights reserved.
00006  *
00007  * See the COPYING file for the terms of usage and distribution.
00008  */
00009 
00010 #ifndef _LOG4CPP_TIMESTAMP_HH
00011 #define _LOG4CPP_TIMESTAMP_HH
00012 
00013 #include "log4cpp/Portability.hh"
00014 #include "log4cpp/Export.hh"
00015 
00016 namespace log4cpp {
00017 
00021     class LOG4CPP_EXPORT TimeStamp {
00022         public:
00026         TimeStamp();
00027 
00032         TimeStamp(unsigned int seconds, unsigned int microSeconds = 0);
00033 
00034         inline int getSeconds() const {
00035             return _seconds;
00036         };
00037 
00038         inline int getMilliSeconds() const {
00039             return _microSeconds / 1000;
00040         };
00041 
00042         inline int getMicroSeconds() const {
00043             return _microSeconds;
00044         };
00045 
00046         static inline const TimeStamp& getStartTime() {
00047             return _startStamp;
00048         };
00049 
00050         protected:
00051         static TimeStamp _startStamp;
00052 
00053         int _seconds;
00054         int _microSeconds;
00055     };
00056 }
00057 
00058 #endif // _LOG4CPP_TIMESTAMP_HH
00059 

Generated at Mon Jan 28 01:40:21 2002 for log4cpp by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001