process: user and system should be divide by ClockTicks directly.

pull/43/merge
Shirou WAKAYAMA 10 years ago
parent 8db78af11e
commit 1f5fdd1fba

@ -550,8 +550,8 @@ func (p *Process) fillFromStat() (string, int32, *cpu.CPUTimesStat, int64, int32
cpuTimes := &cpu.CPUTimesStat{ cpuTimes := &cpu.CPUTimesStat{
CPU: "cpu", CPU: "cpu",
User: float64(utime * (1000 / ClockTicks)), User: float64(utime / ClockTicks),
System: float64(stime * (1000 / ClockTicks)), System: float64(stime / ClockTicks),
} }
bootTime, _ := host.BootTime() bootTime, _ := host.BootTime()

Loading…
Cancel
Save