Fix Tick example in slides
This commit is contained in:
parent
188819ffa5
commit
dec78a3841
1 changed files with 4 additions and 2 deletions
|
@ -361,8 +361,10 @@
|
|||
func Tick(d time.Duration) <-chan time.Time {
|
||||
ch := make(chan time.Time)
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(d)
|
||||
ch <- time.Now()
|
||||
}
|
||||
}()
|
||||
return ch
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue