Skip to content

Commit

Permalink
handle hz values
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Feb 22, 2017
1 parent 57dbff4 commit 70e6762
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpu/cpu_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func finishCPUInfo(c *InfoStat) error {
}
}
c.Mhz = value / 1000.0 // value is in kHz
if c.Mhz > 9999 {
c.Mhz = c.Mhz / 1000.0 // value in Hz
}
return nil
}

Expand Down

0 comments on commit 70e6762

Please sign in to comment.