summaryrefslogtreecommitdiff
path: root/status/02-cpu.go
diff options
context:
space:
mode:
Diffstat (limited to 'status/02-cpu.go')
-rw-r--r--status/02-cpu.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/status/02-cpu.go b/status/02-cpu.go
index f67d908..7128661 100644
--- a/status/02-cpu.go
+++ b/status/02-cpu.go
@@ -42,9 +42,7 @@ func getcpus(c chan [][]string, e chan error) {
}
}
-func cpu(name string) error {
- u := newUpdate(name)
-
+func cpu(u *Block) error {
cpus := [2]chan [][]string{
make(chan [][]string),
make(chan [][]string) }
@@ -127,10 +125,10 @@ func cpu(name string) error {
u.drawText(cx, blendGYR(int(cp)), fmt.Sprintf("%d°C", temps / ncores))
- updates <- u
return nil
}
func init() {
- register("cpu", cpu)
+ // 0 second interval, as there is already a 1 second sleep in cpu()
+ register("cpu", cpu, 0)
}