[cpu]linux: handle hz values by tmm1

This commit is contained in:
WAKAYAMA Shirou 2017-03-23 21:36:54 +09:00
parent a63f1aeeec
commit 3499dec5c0
1 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,9 @@ func finishCPUInfo(c *InfoStat) error {
return nil
}
c.Mhz = value / 1000.0 // value is in kHz
if c.Mhz > 9999 {
c.Mhz = c.Mhz / 1000.0 // value in Hz
}
return nil
}