summaryrefslogtreecommitdiffstats
path: root/osdep/timer-darwin.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /osdep/timer-darwin.c
parentAdding upstream version 0.37.0. (diff)
downloadmpv-85641ae1aad608329bed81c5ced87e668b7f629e.tar.xz
mpv-85641ae1aad608329bed81c5ced87e668b7f629e.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'osdep/timer-darwin.c')
-rw-r--r--osdep/timer-darwin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/osdep/timer-darwin.c b/osdep/timer-darwin.c
index bb8a9b4..36e7194 100644
--- a/osdep/timer-darwin.c
+++ b/osdep/timer-darwin.c
@@ -36,7 +36,12 @@ void mp_sleep_ns(int64_t ns)
uint64_t mp_raw_time_ns(void)
{
- return mach_absolute_time() * timebase_ratio_ns;
+ return mp_raw_time_ns_from_mach(mach_absolute_time());
+}
+
+uint64_t mp_raw_time_ns_from_mach(uint64_t mach_time)
+{
+ return mach_time * timebase_ratio_ns;
}
void mp_raw_time_init(void)