mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
cpu[darwin]: convert cpu frequency to Mhz.
This commit is contained in:
parent
b1a93c4e33
commit
0d7ff2eb40
@ -166,10 +166,11 @@ func CPUInfo() ([]CPUInfoStat, error) {
|
||||
}
|
||||
|
||||
values := strings.Fields(string(out))
|
||||
c.Mhz, err = strconv.ParseFloat(values[1], 64)
|
||||
mhz, err := strconv.ParseFloat(values[1], 64)
|
||||
if err != nil {
|
||||
return ret, err
|
||||
}
|
||||
c.Mhz = mhz / 1000000.0
|
||||
|
||||
return append(ret, c), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user