diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-22 04:31:36 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-26 16:49:38 +0000 |
commit | 34d99840a5cee8907cf4b2528efb1670a8f51744 (patch) | |
tree | 4b1f1847c9f81eb650d29cb519a44ed5d3d9e404 /video/out/drm_common.c | |
parent | 032b7de97f1c8c28358a96e9ecfac87d6621a4fb (diff) | |
download | mpv-34d99840a5cee8907cf4b2528efb1670a8f51744.tar.bz2 mpv-34d99840a5cee8907cf4b2528efb1670a8f51744.tar.xz |
timer: use MP_TIME macros
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r-- | video/out/drm_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c index d3cb58e8a6..67cac7a908 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -946,7 +946,7 @@ static void drm_pflip_cb(int fd, unsigned int msc, unsigned int sec, struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) goto fail; - int64_t now_monotonic = ts.tv_sec * UINT64_C(1000000000) + ts.tv_nsec; + int64_t now_monotonic = MP_TIME_S_TO_NS(ts.tv_sec) + ts.tv_nsec; int64_t ust_mp_time = mp_time_ns() - (now_monotonic - vsync->ust * 1000); const uint64_t ust_since_enqueue = vsync->ust - frame_vsync->ust; |