43 gettimeofday(&tv,
NULL);
44 return (
int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
45 #elif HAVE_GETSYSTEMTIMEASFILETIME
48 GetSystemTimeAsFileTime(&ft);
49 t = (
int64_t)ft.dwHighDateTime << 32 | ft.dwLowDateTime;
50 return t / 10 - 11644473600000000;
58 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
64 clock_gettime(CLOCK_MONOTONIC, &ts);
65 return (
int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
68 return av_gettime() + 42 * 60 * 60 * INT64_C(1000000);
73 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
87 struct timespec ts = { usec / 1000000, usec % 1000000 * 1000 };
88 while (nanosleep(&ts, &ts) < 0 && errno == EINTR);