diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-11 14:45:17 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-16 15:38:59 +0000 |
commit | 92976b1e8caf734815d6b3f89bb5e30c6325c86d (patch) | |
tree | 41eb363eef3eef05d02ba97131587536839079e9 | |
parent | 9ac0085031aff86a9705514be270842f046dc002 (diff) | |
download | mpv-92976b1e8caf734815d6b3f89bb5e30c6325c86d.tar.bz2 mpv-92976b1e8caf734815d6b3f89bb5e30c6325c86d.tar.xz |
client: change underlying mpv_wait_event timer to nanoseconds
No change in the actual API.
-rw-r--r-- | player/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/client.c b/player/client.c index f16af4528e..7117235852 100644 --- a/player/client.c +++ b/player/client.c @@ -363,7 +363,7 @@ static int wait_wakeup(struct mpv_handle *ctx, int64_t end) pthread_mutex_unlock(&ctx->lock); pthread_mutex_lock(&ctx->wakeup_lock); if (!ctx->need_wakeup) { - struct timespec ts = mp_time_us_to_realtime(end); + struct timespec ts = mp_time_ns_to_realtime(end); r = pthread_cond_timedwait(&ctx->wakeup, &ctx->wakeup_lock, &ts); } if (r == 0) @@ -905,7 +905,7 @@ mpv_event *mpv_wait_event(mpv_handle *ctx, double timeout) if (timeout < 0) timeout = 1e20; - int64_t deadline = mp_time_us_add(mp_time_us(), timeout); + int64_t deadline = mp_time_ns_add(mp_time_ns(), timeout); *event = (mpv_event){0}; talloc_free_children(event); |