Fix CPU percentage on M1 silicon Macs

This commit is contained in:
Luke Groeninger 2021-01-02 00:45:53 -06:00 committed by cgzones
parent 90ea3ac3c9
commit a150a81669
1 changed files with 1 additions and 1 deletions

View File

@ -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) {