summaryrefslogtreecommitdiffstats
path: root/osdep/timer-darwin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)