From b8dc51929a36660ce6fb18774e7baba65348d9e6 Mon Sep 17 00:00:00 2001 From: WAKAYAMA shirou Date: Sun, 15 Feb 2015 20:48:29 +0900 Subject: [PATCH] forget to change float32 to float64 --- cpu/cpu_darwin.go | 10 +++++----- cpu/cpu_freebsd.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cpu/cpu_darwin.go b/cpu/cpu_darwin.go index b33ec98..72b08d1 100644 --- a/cpu/cpu_darwin.go +++ b/cpu/cpu_darwin.go @@ -68,11 +68,11 @@ func CPUTimes(percpu bool) ([]CPUTimesStat, error) { } c := CPUTimesStat{ - User: float32(user / ClocksPerSec), - Nice: float32(nice / ClocksPerSec), - System: float32(sys / ClocksPerSec), - Idle: float32(idle / ClocksPerSec), - Irq: float32(intr / ClocksPerSec), + User: float64(user / ClocksPerSec), + Nice: float64(nice / ClocksPerSec), + System: float64(sys / ClocksPerSec), + Idle: float64(idle / ClocksPerSec), + Irq: float64(intr / ClocksPerSec), } if !percpu { c.CPU = "cpu-total" diff --git a/cpu/cpu_freebsd.go b/cpu/cpu_freebsd.go index cd76723..dc28dd6 100644 --- a/cpu/cpu_freebsd.go +++ b/cpu/cpu_freebsd.go @@ -68,11 +68,11 @@ func CPUTimes(percpu bool) ([]CPUTimesStat, error) { } c := CPUTimesStat{ - User: float32(user / ClocksPerSec), - Nice: float32(nice / ClocksPerSec), - System: float32(sys / ClocksPerSec), - Idle: float32(idle / ClocksPerSec), - Irq: float32(intr / ClocksPerSec), + User: float64(user / ClocksPerSec), + Nice: float64(nice / ClocksPerSec), + System: float64(sys / ClocksPerSec), + Idle: float64(idle / ClocksPerSec), + Irq: float64(intr / ClocksPerSec), } if !percpu { c.CPU = "cpu-total"