diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-17 20:05:16 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-10 19:10:55 +0000 |
commit | 8fccd6bf91abe42a032b2c7c14bb7a0366ad19bf (patch) | |
tree | cc194d7b46a3b7ef3b8206cddfc856f9cfb6925b /player/playloop.c | |
parent | ae335ef155d03c9d65914499e2dc2baca71d0381 (diff) | |
download | mpv-8fccd6bf91abe42a032b2c7c14bb7a0366ad19bf.tar.bz2 mpv-8fccd6bf91abe42a032b2c7c14bb7a0366ad19bf.tar.xz |
player: store last_time timestamp in nanoseconds
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c index b0df04f2d9..eb42a3131c 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -123,10 +123,10 @@ static void mp_process_input(struct MPContext *mpctx) double get_relative_time(struct MPContext *mpctx) { - int64_t new_time = mp_time_us(); + int64_t new_time = mp_time_ns(); int64_t delta = new_time - mpctx->last_time; mpctx->last_time = new_time; - return delta * 0.000001; + return delta * 1e-9; } void update_core_idle_state(struct MPContext *mpctx) |