#include <timehelper.h>
Public Member Functions | |
Time () | |
Time (long tv_sec, long tv_usec) | |
Time (time_t time) | |
long | sec () const |
Returns seconds value. | |
long | usec () const |
Returns microseconds value. | |
void | sec (long s) |
Sets the seconds value. | |
void | usec (long us) |
Sets the microseconds value. | |
int | setTime (struct tm *t) |
Sets this Time using the mktime function. | |
time_t | getTime () const |
Returns this Time as a time_t> value. | |
void | gmtime (struct tm *t) const |
Populates tm using the gmtime() function. | |
void | localtime (struct tm *t) const |
Populates tm using the localtime() function. | |
log4cplus::tstring | getFormattedTime (const log4cplus::tstring &fmt, bool use_gmtime=false) const |
Returns a string with a "formatted time" specified by fmt . | |
Time & | operator+= (const Time &rhs) |
Time & | operator-= (const Time &rhs) |
Time & | operator/= (long rhs) |
Time & | operator *= (long rhs) |
bool | operator== (const Time &rhs) |
bool | operator!= (const Time &rhs) |
Static Public Member Functions | |
Time | gettimeofday () |
Returns the current time using the gettimeofday() method if it is available on the current platform. |
Definition at line 35 of file timehelper.h.
|
|
|
|
|
|
|
Returns a string with a "formatted time" specified by
It used the
Look at your platform's
The following additional options are provided: |
|
Returns this Time as a
|
|
Returns the current time using the (Not on WIN32.) |
|
Populates
|
|
Populates
|
|
|
|
Definition at line 114 of file timehelper.h. |
|
|
|
|
|
|
|
Definition at line 112 of file timehelper.h. |
|
Sets the seconds value.
Definition at line 62 of file timehelper.h. |
|
Returns seconds value.
Definition at line 52 of file timehelper.h. |
|
Sets this Time using the
|
|
Sets the microseconds value.
Definition at line 67 of file timehelper.h. |
|
Returns microseconds value.
Definition at line 57 of file timehelper.h. |