mirror of
https://github.com/status-im/status-go-monitor.git
synced 2025-01-13 04:44:10 +00:00
18 lines
190 B
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)
|
|
}
|
|
}
|