41 gettimeofday(&tv,
NULL);
42 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
43 #elif HAVE_GETSYSTEMTIMEASFILETIME
46 GetSystemTimeAsFileTime(&ft);
47 t = (int64_t)ft.dwHighDateTime << 32 | ft.dwLowDateTime;
48 return t / 10 - 11644473600000000;
57 struct timespec ts = { usec / 1000000, usec % 1000000 * 1000 };
58 while (nanosleep(&ts, &ts) < 0 && errno == EINTR);