23 #ifndef _LOG4CPLUS_HELPERS_TIME_HELPER_HEADER_
24 #define _LOG4CPLUS_HELPERS_TIME_HELPER_HEADER_
26 #include "dcmtk/oflog/config.h"
35 #include "dcmtk/ofstd/ofstdinc.h"
45 class LOG4CPLUS_EXPORT
Time {
48 Time(time_t tv_sec,
long tv_usec);
49 explicit Time(time_t time);
56 static Time gettimeofday();
62 time_t
sec()
const {
return tv_sec; }
67 long usec()
const {
return tv_usec; }
72 void sec(time_t s) { tv_sec = s; }
77 void usec(
long us) { tv_usec = us; }
82 time_t setTime(
struct tm* t);
87 time_t getTime()
const;
93 void gmtime(
struct tm* t)
const;
99 void localtime(
struct tm* t)
const;
115 bool use_gmtime =
false)
const;
120 Time& operator/=(
long rhs);
121 Time& operator*=(
long rhs);
166 #endif // _LOG4CPLUS_HELPERS_TIME_HELPER_HEADER_
long usec() const
Returns microseconds value.
void sec(time_t s)
Sets the seconds value.
This class represents a Epoch time with microsecond accuracy.
time_t sec() const
Returns seconds value.
void usec(long us)
Sets the microseconds value.
a simple string class that implements a subset of std::string.