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);
int av_usleep(unsigned usec)
Sleep for a period of time.
int av_gettime_relative_is_monotonic(void)
Indicates with a boolean result if the av_gettime_relative() time source is monotonic.
int64_t av_gettime(void)
Get the current time in microseconds.
int64_t av_gettime_relative(void)
Get the current time in microseconds since some unspecified starting point.