19 #if defined(WIN32) && !defined(MSDOS)
29 DWORD milliseconds = GetTickCount();
30 now.tv_sec = milliseconds / 1000;
31 now.tv_usec = (milliseconds % 1000) * 1000;
35 #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
47 struct timespec tsnow;
48 if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
49 now.tv_sec = tsnow.tv_sec;
50 now.tv_usec = tsnow.tv_nsec / 1000;
57 #ifdef HAVE_GETTIMEOFDAY
59 (
void)gettimeofday(&
now, NULL);
69 #elif defined(HAVE_GETTIMEOFDAY)
79 (void)gettimeofday(&
now, NULL);