From df764bc0c3926ff06902c2ed8609ed7633408550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 16 Sep 2023 04:45:24 +0200 Subject: vo: change vsync base to nanoseconds There is no reason to use microseconds precision. We have precise timers all all relevant platforms. --- video/out/present_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out/present_sync.c') diff --git a/video/out/present_sync.c b/video/out/present_sync.c index 5c8ae42ab5..e7112ccc39 100644 --- a/video/out/present_sync.c +++ b/video/out/present_sync.c @@ -70,8 +70,8 @@ void present_sync_swap(struct mp_present *present) if (clock_gettime(CLOCK_MONOTONIC, &ts)) return; - int64_t now_monotonic = ts.tv_sec * 1000000LL + ts.tv_nsec / 1000; - int64_t ust_mp_time = mp_time_us() - (now_monotonic - ust); + int64_t now_monotonic = ts.tv_sec * UINT64_C(1000000000) + ts.tv_nsec; + int64_t ust_mp_time = mp_time_ns() - (now_monotonic - ust); present->last_queue_display_time = ust_mp_time; } -- cgit v1.2.3