34 #define EPOCHFILETIME (116444736000000000i64)
36 #define EPOCHFILETIME (116444736000000000LL)
54 GetSystemTimeAsFileTime(&ft);
55 li.LowPart = ft.dwLowDateTime;
56 li.HighPart = ft.dwHighDateTime;
60 tv.tv_sec = (long)(t / 1000000);
61 tv.tv_usec = (long)(t % 1000000);
76 tv_sec += rhs_.tv_sec;
77 tv_usec += rhs_.tv_usec;
83 else if (tv_sec >= 1 && tv_usec < 0) {
95 tv_sec -= rhs_.tv_sec;
96 tv_usec -= rhs_.tv_usec;
129 if (tv_sec >= 1 && tv_usec < 0) {
133 else if (tv_sec < 0 && tv_usec > 0) {
153 ct = *( localtime ((
const time_t*) &tv_sec) );
155 ct = *( gmtime ((
const time_t*) &tv_sec) );
158 strftime (buf, 80,
"%Y/%j %H:%M:%S", &ct);
159 sprintf (buf + strlen(buf),
160 ".%03ld", (tv_usec %1000000)/1000);
163 strftime(buf, 80, fmt_, &ct);
177 ct = *( localtime ((
const time_t*) &tv_sec) );
179 ct = *( gmtime ((
const time_t*) &tv_sec) );
181 strftime (buf, 80,
"%H:%M:%S", &ct);
182 sprintf (buf + strlen(buf),
".%03ld",
millisec ());
196 ct = *( localtime ((
const time_t*) &tv_sec) );
198 ct = *( gmtime ((
const time_t*) &tv_sec) );
200 strftime (buf, 80,
"%M:%S", &ct);
201 sprintf (buf + strlen(buf),
".%03ld",
millisec ());
215 ct = *( localtime ((
const time_t*) &tv_sec) );
217 ct = *( gmtime ((
const time_t*) &tv_sec) );
219 strftime (buf, 80,
"%S", &ct);
220 sprintf (buf + strlen(buf),
".%03ld",
millisec ());
229 static const char self []=
"TimeVal::dump_to_log";
trace(
self);
233 DL((
REACT,
"=== TimeVal %s ===\n", var_name_.c_str ()));
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"));