34#define EPOCHFILETIME (116444736000000000i64)
36#define EPOCHFILETIME (116444736000000000LL)
55 li.LowPart =
ft.dwLowDateTime;
56 li.HighPart =
ft.dwHighDateTime;
60 tv.tv_sec = (
long)(
t / 1000000);
61 tv.tv_usec = (
long)(
t % 1000000);
160 ".%03ld", (
tv_usec %1000000)/1000);
229 static const char self []=
"TimeVal::dump_to_log";
trace(
self);
235 DL((
REACT,
"tv_sec = %d, tv_msec = %d, tv_mls = %d\n",
237 DL((
REACT,
"(double) = %7.4f\n",
double (*
this)));
238 DL((
REACT,
"==================\n"));
An abstraction to message logging facility.
#define trace(s)
trace() is used to trace function call chain in C++ program.
#define DL(X)
A macro for writing debug message to the Logger.
static const long ONE_SECOND
Class TimeVal is a wrapper around UNIX timeval structure.
A wrapper class to provide AutoPtr with reference semantics.
static Logger * get_instance()
Return an instance of templated class T.
static TimeVal m_zero
Zero time value.
string fmtString(const char *fmt_=NULL) const
Format timeval structure into readable format.
void normalize()
Normalization after arithmetic operation.
string fmt_ss_mls() const
Format timeval structure in readable format SS.MLS.
string fmt_mm_ss_mls() const
Format timeval structure in readable format MM:SS.MLS.
long msec(void) const
Get microseconds.
TimeVal & operator+=(const TimeVal &rhs_)
Addition.
long millisec() const
Convert tv_usec's microseconds (=1/1,000,000 sec) to milliseconds (=1/1,000 sec).
void dump_to_log(const string &name_="") const
Dump value of struct timeval to the log file with mask TRACE = DBG_APP15.
static TimeVal gettimeofday()
Shields off underlying OS differences in getting current time.
long sec(void) const
Get secons.
TimeVal & operator-=(const TimeVal &rhs_)
Substraction.
string fmt_hh_mm_ss_mls() const
Format timeval structure in readable format HH:MM:SS.MLS.
@ REACT
Class Reactor/PrioriyQueue messages