[PATCH 2/3] kernel32: Fix tick count calculation on Mac.

Chip Davis cdavis at codeweavers.com
Tue Nov 26 22:29:59 CST 2019


Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
 dlls/kernel32/time.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 817a8305186..716230aa7a2 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -78,6 +78,10 @@ static inline ULONGLONG monotonic_counter(void)
     static mach_timebase_info_data_t timebase;
 
     if (!timebase.denom) mach_timebase_info( &timebase );
+#ifdef HAVE_MACH_CONTINUOUS_TIME
+    if (&mach_continuous_time != NULL)
+        return mach_continuous_time() * timebase.numer / timebase.denom / 100;
+#endif
     return mach_absolute_time() * timebase.numer / timebase.denom / 100;
 #elif defined(HAVE_CLOCK_GETTIME)
     struct timespec ts;
-- 
2.21.0




More information about the wine-devel mailing list