|
|
@ -29,6 +29,7 @@
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
#include <sched.h>
|
|
|
|
#include <sched.h>
|
|
|
@ -46,7 +47,6 @@
|
|
|
|
#define DELTA_EPOCH 11644473600000000ULL
|
|
|
|
#define DELTA_EPOCH 11644473600000000ULL
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#include <signal.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
@ -137,6 +137,7 @@ common_gettimeofday(struct timeval *tv, void *tz)
|
|
|
|
FILETIME ft;
|
|
|
|
FILETIME ft;
|
|
|
|
uint64_t tmp_time = 0;
|
|
|
|
uint64_t tmp_time = 0;
|
|
|
|
static bool tzflag = false;
|
|
|
|
static bool tzflag = false;
|
|
|
|
|
|
|
|
struct timezone *tzp = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
if (tv != NULL) {
|
|
|
|
if (tv != NULL) {
|
|
|
|
GetSystemTimeAsFileTime(&ft);
|
|
|
|
GetSystemTimeAsFileTime(&ft);
|
|
|
@ -161,8 +162,7 @@ common_gettimeofday(struct timeval *tv, void *tz)
|
|
|
|
tzflag = true;
|
|
|
|
tzflag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct timezone *tzp = (struct timezone *)tz;
|
|
|
|
tzp = (struct timezone *)tz;
|
|
|
|
|
|
|
|
|
|
|
|
tzp->tz_minuteswest = _timezone / 60;
|
|
|
|
tzp->tz_minuteswest = _timezone / 60;
|
|
|
|
tzp->tz_dsttime = _daylight;
|
|
|
|
tzp->tz_dsttime = _daylight;
|
|
|
|
}
|
|
|
|
}
|
|
|
|