From 3499dec5c013d054d5d2a99ec48345998034e841 Mon Sep 17 00:00:00 2001 From: WAKAYAMA Shirou Date: Thu, 23 Mar 2017 21:36:54 +0900 Subject: [PATCH] [cpu]linux: handle hz values by tmm1 --- cpu/cpu_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go index 220cd64..9f90a7e 100644 --- a/cpu/cpu_linux.go +++ b/cpu/cpu_linux.go @@ -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 }