Entropy Apple: change time function called

Use clock_gettime_nsec_np and get the raw monotonic counter.
This commit is contained in:
Sean Parkinson
2025-01-16 04:14:55 +10:00
parent e76186f060
commit 6e383547dd

View File

@@ -818,7 +818,7 @@ static WC_INLINE word64 Entropy_TimeHiRes(void)
*/ */
static WC_INLINE word64 Entropy_TimeHiRes(void) static WC_INLINE word64 Entropy_TimeHiRes(void)
{ {
return mach_absolute_time(); return clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
} }
#elif !defined(ENTROPY_MEMUSE_THREAD) && defined(__aarch64__) #elif !defined(ENTROPY_MEMUSE_THREAD) && defined(__aarch64__)
/* Get the high resolution time counter. /* Get the high resolution time counter.