diff --git a/wtf/scheduler.go b/wtf/scheduler.go index b670a4f5..b2e7824e 100644 --- a/wtf/scheduler.go +++ b/wtf/scheduler.go @@ -10,6 +10,9 @@ type Scheduler interface { } func Schedule(widget Scheduler) { + // Kick off the first refresh and then leave the rest to the timer + widget.Refresh() + interval := time.Duration(widget.RefreshInterval()) * time.Second if interval <= 0 { @@ -19,9 +22,6 @@ func Schedule(widget Scheduler) { tick := time.NewTicker(interval) quit := make(chan struct{}) - // Kick off the first refresh and then leave the rest to the timer - widget.Refresh() - for { select { case <-tick.C: