mirror of
https://github.com/status-im/status-go-monitor.git
synced 2025-01-28 20:14:46 +00:00
18 lines
220 B
Go
18 lines
220 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func FetchLoop(client *StatusGoClient, state *State) {
|
||
|
for {
|
||
|
select {
|
||
|
case <-threadDone:
|
||
|
return
|
||
|
default:
|
||
|
state.Fetch(client)
|
||
|
}
|
||
|
<-time.After(interval * time.Second)
|
||
|
}
|
||
|
}
|