mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
removed unused sleep code
This commit is contained in:
parent
56158d2e93
commit
1075096f2f
@ -62,28 +62,9 @@ func (widget *Widget) Refresh() {
|
|||||||
return
|
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.UpdateRefreshedAt()
|
||||||
widget.View.Clear()
|
widget.View.Clear()
|
||||||
|
|
||||||
if !ok {
|
|
||||||
widget.View.SetText(
|
|
||||||
fmt.Sprint("Error!"),
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
display(widget)
|
display(widget)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user