mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
A ton of cleanup around how config is handled and go rountines are executed
This commit is contained in:
committed by
Chris Cummer
parent
dd51994d8d
commit
71f8fc789f
@@ -4,12 +4,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Refresher interface {
|
||||
type Scheduler interface {
|
||||
Refresh()
|
||||
RefreshInterval() int
|
||||
}
|
||||
|
||||
func Refresh(widget Refresher) {
|
||||
func Schedule(widget Scheduler) {
|
||||
tick := time.NewTicker(time.Duration(widget.RefreshInterval()) * time.Second)
|
||||
quit := make(chan struct{})
|
||||
|
||||
Reference in New Issue
Block a user