mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
@ -14,6 +14,7 @@ in the source distribution for its full text.
|
||||
#include <mach/mach.h>
|
||||
|
||||
#include "CRT.h"
|
||||
#include "Platform.h"
|
||||
#include "Process.h"
|
||||
|
||||
|
||||
@ -248,7 +249,7 @@ void DarwinProcess_setFromLibprocPidinfo(DarwinProcess* proc, DarwinProcessList*
|
||||
uint64_t diff = (pti.pti_total_system - proc->stime)
|
||||
+ (pti.pti_total_user - proc->utime);
|
||||
|
||||
proc->super.percent_cpu = (double)diff * (double)dpl->super.cpuCount
|
||||
proc->super.percent_cpu = (double)diff * (double)dpl->super.cpuCount * Platform_timebaseToNS
|
||||
/ ((double)dpl->global_diff * 100000.0);
|
||||
|
||||
// fprintf(stderr, "%f %llu %llu %llu %llu %llu\n", proc->super.percent_cpu,
|
||||
|
Reference in New Issue
Block a user