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
commit5a3b54c78ce63d899f76dbb3db72e4894b40bd53 (patch)
tree50693d13eeefc4d683bdf5417f0861b0ef274a0c /osdep/timer-darwin.c
parentAdding debian version 0.37.0-1. (diff)
downloadmpv-5a3b54c78ce63d899f76dbb3db72e4894b40bd53.tar.xz
mpv-5a3b54c78ce63d899f76dbb3db72e4894b40bd53.zip
Merging upstream version 0.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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)