From a150a81669027601aefc231f208a715e16b24c62 Mon Sep 17 00:00:00 2001 From: Luke Groeninger Date: Sat, 2 Jan 2021 00:45:53 -0600 Subject: Fix CPU percentage on M1 silicon Macs --- darwin/DarwinProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c index a2848920..e2e98ce6 100644 --- a/darwin/DarwinProcessList.c +++ b/darwin/DarwinProcessList.c @@ -161,7 +161,7 @@ void ProcessList_delete(ProcessList* this) { static double ticksToNanoseconds(const double ticks) { const double nanos_per_sec = 1e9; - return ticks / (double) Platform_clockTicksPerSec * Platform_timebaseToNS * nanos_per_sec; + return (ticks / Platform_timebaseToNS) * (nanos_per_sec / (double) Platform_clockTicksPerSec); } void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { -- cgit v1.2.3