[SIGAR-19] Change cpu time units to milliseconds
This commit is contained in:
1 parent
46d43d99b8
commit
70cefa7c18
4 files changed
+34
-34
No files matched your search
@@ -434,10 +434,10 @@ int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist)
|
||||
SIGAR_ZERO(cpu);
|
||||
}
|
||||
|
||||
cpu->user += SIGAR_TICK2SEC(cpuinfo[CPU_USER]);
|
||||
cpu->sys += SIGAR_TICK2SEC(cpuinfo[CPU_KERNEL]);
|
||||
cpu->idle += SIGAR_TICK2SEC(cpuinfo[CPU_IDLE]);
|
||||
cpu->wait += SIGAR_TICK2SEC(cpuinfo[CPU_WAIT]);
|
||||
cpu->user += SIGAR_TICK2MSEC(cpuinfo[CPU_USER]);
|
||||
cpu->sys += SIGAR_TICK2MSEC(cpuinfo[CPU_KERNEL]);
|
||||
cpu->idle += SIGAR_TICK2MSEC(cpuinfo[CPU_IDLE]);
|
||||
cpu->wait += SIGAR_TICK2MSEC(cpuinfo[CPU_WAIT]);
|
||||
cpu->nice += 0; /* no cpu->nice */
|
||||
cpu->total = cpu->user + cpu->sys + cpu->idle + cpu->wait;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user