diff options
Diffstat (limited to 'libavutil/time.c')
-rw-r--r-- | libavutil/time.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/time.c b/libavutil/time.c index afa6658..9cc1898 100644 --- a/libavutil/time.c +++ b/libavutil/time.c @@ -61,7 +61,11 @@ int64_t av_gettime_relative(void) #endif { struct timespec ts; +#if defined(CLOCK_MONOTONIC_RAW) + clock_gettime(CLOCK_MONOTONIC_RAW, &ts); +#else clock_gettime(CLOCK_MONOTONIC, &ts); +#endif return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000; } #endif |