Mark McGranaghan ebe6383f98 renumber again
2012-09-23 13:29:28 -07:00

19 lines
324 B
Go

// ## Tickers
package main
import "time"
import "fmt"
func main() {
ticker := time.NewTicker(time.Millisecond * 500)
go func() {
for t := range ticker.C {
fmt.Println("Tick at", t)
}
}()
time.Sleep(time.Millisecond * 1500)
ticker.Stop()
fmt.Println("Ticker stopped")
}