summaryrefslogtreecommitdiffstats
path: root/video/out/vo_xv.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-29 17:24:21 -0500
committerDudemanguy <random342@airmail.cc>2023-10-10 19:10:55 +0000
commit59dd7d94af7651baf7e60966c5f8e7d52959d958 (patch)
treec6eb2938d2a63ebb07e377794f28ca708d786abd /video/out/vo_xv.c
parentfcebee9080a113f3248d218e451345db3f965b47 (diff)
downloadmpv-59dd7d94af7651baf7e60966c5f8e7d52959d958.tar.bz2
mpv-59dd7d94af7651baf7e60966c5f8e7d52959d958.tar.xz
timer: change mp_sleep_us to mp_sleep_ns
Linux and macOS already use nanosecond resolution for their sleep functions. It was just being converted from microseconds before. Since we have mp_time_ns now, go ahead and bump the precision here. The timer for windows uses some timeBeginPeriod thing which I'm not sure what it does really but whatever just convert the units to ms like they were doing before. There's really no reason to keep the mp_sleep_us helper around. A multiplication by 1000 is trivial and underlying OS clocks have nanosecond precision.
Diffstat (limited to 'video/out/vo_xv.c')
-rw-r--r--video/out/vo_xv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 22bce03770..cffd3a797f 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -670,7 +670,7 @@ static void wait_for_completion(struct vo *vo, int max_outstanding)
" for XShm completion events...\n");
ctx->Shm_Warned_Slow = 1;
}
- mp_sleep_us(1000);
+ mp_sleep_ns(1e6);
vo_x11_check_events(vo);
}
}