1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

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

This commit is contained in:
Shirou WAKAYAMA 2015-03-17 17:04:31 +09:00
parent 8db78af11e
commit 1f5fdd1fba

View File

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