status-go-monitor/loop.go

18 lines
190 B
Go

package main
import (
"time"
)
func FetchLoop(state *State) {
for {
select {
case <-threadDone:
return
default:
state.Fetch()
}
<-time.After(interval * time.Second)
}
}