some small changes
parent
fc0c5c43f1
commit
1124172331
|
@ -10,8 +10,8 @@ func Ticker(fn func(), interval time.Duration) chan struct{} {
|
|||
}
|
||||
ticker := time.NewTicker(interval)
|
||||
stopChan := make(chan struct{})
|
||||
fn()
|
||||
go func() {
|
||||
fn()
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
|
|
Loading…
Reference in New Issue