diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-09-15 01:39:35 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-29 20:48:58 +0000 |
commit | da4c4d2ebd2473677045b85f923cb14349b1e60d (patch) | |
tree | 9c664eae20220d598bb3ce336a5d7c7cbe3973e9 /osdep/timer.c | |
parent | 381386330bd3663055250e6883f1c0c1e4069eec (diff) | |
download | mpv-da4c4d2ebd2473677045b85f923cb14349b1e60d.tar.bz2 mpv-da4c4d2ebd2473677045b85f923cb14349b1e60d.tar.xz |
timer: rename mp_time_us_to_timespec to reflect what it actually does
Diffstat (limited to 'osdep/timer.c')
-rw-r--r-- | osdep/timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/osdep/timer.c b/osdep/timer.c index 8a52823b0f..0943ab3871 100644 --- a/osdep/timer.c +++ b/osdep/timer.c @@ -85,7 +85,7 @@ static void get_realtime(struct timespec *out_ts) #endif } -struct timespec mp_time_us_to_timespec(int64_t time_us) +struct timespec mp_time_us_to_realtime(int64_t time_us) { struct timespec ts; get_realtime(&ts); @@ -112,7 +112,7 @@ struct timespec mp_time_us_to_timespec(int64_t time_us) struct timespec mp_rel_time_to_timespec(double timeout_sec) { - return mp_time_us_to_timespec(mp_add_timeout(mp_time_us(), timeout_sec)); + return mp_time_us_to_realtime(mp_add_timeout(mp_time_us(), timeout_sec)); } #if 0 @@ -137,7 +137,7 @@ int main(void) { #if TEST_SLEEP mp_sleep_us(delay); #else - struct timespec ts = mp_time_us_to_timespec(r + delay); + struct timespec ts = mp_time_us_to_realtime(r + delay); pthread_cond_timedwait(&cnd, &mtx, &ts); #endif j = (mp_time_us() - r) - delay; |