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:
parent
8db78af11e
commit
1f5fdd1fba
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user