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

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 
00015 namespace log4cpp {
00016 
00020     class LOG4CPP_EXPORT TimeStamp {
00021         public:
00025         TimeStamp();
00026 
00031         TimeStamp(unsigned int seconds, unsigned int microSeconds = 0);
00032 
00036         inline int getSeconds() const {
00037             return _seconds;
00038         };
00039 
00044         inline int getMilliSeconds() const {
00045             return _microSeconds / 1000;
00046         };
00047 
00053         inline int getMicroSeconds() const {
00054             return _microSeconds;
00055         };
00056 
00061         static inline const TimeStamp& getStartTime() {
00062             return _startStamp;
00063         };
00064 
00065         protected:
00066         static TimeStamp _startStamp;
00067 
00068         int _seconds;
00069         int _microSeconds;
00070     };
00071 }
00072 
00073 #endif // _LOG4CPP_TIMESTAMP_HH
00074 

Generated on Mon Oct 28 23:41:43 2002 for log4cpp by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002