diff options
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/timer.c | 4 | ||||
-rw-r--r-- | osdep/timer.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/osdep/timer.c b/osdep/timer.c index 2e184c3026..6f8d992a1e 100644 --- a/osdep/timer.c +++ b/osdep/timer.c @@ -60,7 +60,7 @@ double mp_time_sec(void) return mp_time_us() / (double)(1000 * 1000); } -int64_t mp_add_timeout(int64_t time_us, double timeout_sec) +int64_t mp_time_us_add(int64_t time_us, double timeout_sec) { assert(time_us > 0); // mp_time_us() returns strictly positive values double t = MPCLAMP(timeout_sec * (1000 * 1000), -0x1p63, 0x1p63); @@ -111,5 +111,5 @@ struct timespec mp_time_us_to_realtime(int64_t time_us) struct timespec mp_rel_time_to_timespec(double timeout_sec) { - return mp_time_us_to_realtime(mp_add_timeout(mp_time_us(), timeout_sec)); + return mp_time_us_to_realtime(mp_time_us_add(mp_time_us(), timeout_sec)); } diff --git a/osdep/timer.h b/osdep/timer.h index b98c275697..a511812b56 100644 --- a/osdep/timer.h +++ b/osdep/timer.h @@ -52,7 +52,7 @@ void mp_end_hires_timers(int resolution_ms); // Add a time in seconds to the given time in microseconds, and return it. // Takes care of possible overflows. Never returns a negative or 0 time. -int64_t mp_add_timeout(int64_t time_us, double timeout_sec); +int64_t mp_time_us_add(int64_t time_us, double timeout_sec); // Convert the mp time in microseconds to a timespec using CLOCK_REALTIME. struct timespec mp_time_us_to_realtime(int64_t time_us); |