1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Faster start by having async initial refresh

This commit is contained in:
Chris Cummer
2018-04-06 21:35:55 -07:00
committed by Chris Cummer
parent f1590e29f8
commit 1404140b82
2 changed files with 4 additions and 10 deletions

View File

@@ -13,6 +13,9 @@ func Schedule(widget Scheduler) {
tick := time.NewTicker(time.Duration(widget.RefreshInterval()) * time.Second)
quit := make(chan struct{})
// Kick off the first refresh and then leave the rest to the timer
widget.Refresh()
for {
select {
case <-tick.C: