diff --git a/bargraph/widget.go b/bargraph/widget.go index 51194638..aaea80d1 100644 --- a/bargraph/widget.go +++ b/bargraph/widget.go @@ -62,28 +62,9 @@ func (widget *Widget) Refresh() { return } - if started == false { - // this code should run once - go func() { - for { - time.Sleep(time.Duration(widget.updateInterval) * time.Second) - } - }() - - } - - started = true - widget.UpdateRefreshedAt() widget.View.Clear() - if !ok { - widget.View.SetText( - fmt.Sprint("Error!"), - ) - return - } - display(widget) }