summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Groeninger <luke@dghost.net>2021-01-02 00:45:53 -0600
committercgzones <cgzones@googlemail.com>2021-01-02 22:33:20 +0100
commita150a81669027601aefc231f208a715e16b24c62 (patch)
tree66047479f628691cd3369b3a53025893a5193553
parent90ea3ac3c9104d1519e067aeeefc07c7f75313ca (diff)
Fix CPU percentage on M1 silicon Macs
-rw-r--r--darwin/DarwinProcessList.c2
1 files changed, 1 insertions, 1 deletions
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) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy