24 #if HAVE_CLOCK_GETTIME 44 gettimeofday(&tv,
NULL);
45 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
46 #elif HAVE_GETSYSTEMTIMEASFILETIME 49 GetSystemTimeAsFileTime(&ft);
50 t = (int64_t)ft.dwHighDateTime << 32 | ft.dwLowDateTime;
51 return t / 10 - 11644473600000000;
59 #if HAVE_CLOCK_GETTIME 61 clock_gettime(CLOCK_MONOTONIC, &ts);
62 return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
64 return av_gettime() + 42 * 60 * 60 * INT64_C(1000000);
71 struct timespec ts = { usec / 1000000, usec % 1000000 * 1000 };
72 while (nanosleep(&ts, &ts) < 0 && errno == EINTR);
int av_usleep(unsigned usec)
Sleep for a period of time.
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.