convert cpu times to seconds
This commit is contained in:
parent
7a4580fc08
commit
dff7d13462
@ -376,10 +376,10 @@ int sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist)
|
||||
|
||||
cpu = &cpulist->data[cpulist->number++];
|
||||
|
||||
cpu->user = cpuinfo[CPU_USER];
|
||||
cpu->sys = cpuinfo[CPU_KERNEL];
|
||||
cpu->idle = cpuinfo[CPU_IDLE];
|
||||
cpu->wait = cpuinfo[CPU_WAIT];
|
||||
cpu->user = cpuinfo[CPU_USER] / sigar->ticks;
|
||||
cpu->sys = cpuinfo[CPU_KERNEL] / sigar->ticks;
|
||||
cpu->idle = cpuinfo[CPU_IDLE] / sigar->ticks;
|
||||
cpu->wait = cpuinfo[CPU_WAIT] / sigar->ticks;
|
||||
cpu->nice = 0; /* no cpu->nice */
|
||||
cpu->total = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user