mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
Fix cpu percent on windows
Tested on windows 7: When divided by 100 you get cpu percentage of %0.14 when task manager shows %14. Once this is removed they match.
This commit is contained in:
parent
5c8a03100e
commit
a4ec4177a6
@ -99,7 +99,7 @@ func CPUPercent(interval time.Duration, percpu bool) ([]float64, error) {
|
|||||||
if l.LoadPercentage == nil {
|
if l.LoadPercentage == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
ret = append(ret, float64(*l.LoadPercentage)/100.0)
|
ret = append(ret, float64(*l.LoadPercentage))
|
||||||
}
|
}
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user