summaryrefslogtreecommitdiffstats
path: root/osdep/timer.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-09-15 02:32:13 +0200
committerDudemanguy <random342@airmail.cc>2023-09-29 20:48:58 +0000
commit40e0fea6ebede9452a430cfd6d39bf132e89472d (patch)
treeaf0db12665b610c64a98f5bc7a99a0a340b503ab /osdep/timer.c
parentf338420fd2e9ed4851f10886f0153e40f4b39d6d (diff)
downloadmpv-40e0fea6ebede9452a430cfd6d39bf132e89472d.tar.bz2
mpv-40e0fea6ebede9452a430cfd6d39bf132e89472d.tar.xz
timer: rename mp_add_timeout to reflect what it actually does
Diffstat (limited to 'osdep/timer.c')
-rw-r--r--osdep/timer.c4
1 files changed, 2 insertions, 2 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));
}