diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2018-04-09 09:55:10 -0700 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2018-04-09 09:55:10 -0700 |
commit | 6b469e9f88302f8828c3dc548bad044718664766 (patch) | |
tree | 7a2bcf913c3db4a7689f16fab7d13c757f292556 /widgets | |
parent | ca4febfc8b91026f37b4b363b2dd7b3860fac397 (diff) |
Closes #11
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/cpu.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/cpu.go b/widgets/cpu.go index b9ad437..e9be35b 100644 --- a/widgets/cpu.go +++ b/widgets/cpu.go @@ -25,7 +25,7 @@ func NewCPU(interval time.Duration, zoom int) *CPU { self.Zoom = zoom if self.Count <= 8 { for i := 0; i < self.Count; i++ { - key := "CPU" + strconv.Itoa(i+1) + key := "CPU" + strconv.Itoa(i) self.Data[key] = []float64{0} } } else { @@ -48,7 +48,7 @@ func (self *CPU) update() { if self.Count <= 8 { percent, _ := psCPU.Percent(self.interval, true) for i := 0; i < self.Count; i++ { - key := "CPU" + strconv.Itoa(i+1) + key := "CPU" + strconv.Itoa(i) self.Data[key] = append(self.Data[key], percent[i]) } } else { |