mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
Fix CPU percentage on M1 silicon Macs
This commit is contained in:
parent
90ea3ac3c9
commit
a150a81669
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user