From 4de24208032083af94560ddd82218096eb676f1d Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Tue, 10 Oct 2017 11:27:15 -0400 Subject: [PATCH] Clean up cputemp. --- main/cputemp.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/cputemp.go b/main/cputemp.go index 93f018ed..0e2df678 100644 --- a/main/cputemp.go +++ b/main/cputemp.go @@ -19,8 +19,6 @@ and often times reading this file hangs quite some time. */ func cpuTempMonitor(updater CpuTempUpdateFunc) { timer := time.NewTicker(1 * time.Second) for { - <-timer.C - // Update CPUTemp. temp, err := ioutil.ReadFile("/sys/class/thermal/thermal_zone0/temp") tempStr := strings.Trim(string(temp), "\n") @@ -38,7 +36,7 @@ func cpuTempMonitor(updater CpuTempUpdateFunc) { if t >= invalidCpuTemp { // Only update if valid value was obtained. updater(t) } - + <-timer.C } }