time.NewTicker sends on its C channel at an interval until Stop. The channel is a Go channel, so receive with go/recv. Stop the ticker when the loop is done so it can be collected.
time.NewTicker
C
Stop
go/recv
(def ticker (time.NewTicker (* 10 time.Millisecond))) (dotimes [_ 3] (go/recv (.C ticker)) (println "tick")) (.Stop ticker) (println "stopped")
Three ticks, then the ticker is stopped.
$ glj tickers.glj tick tick tick stopped
Next example: Worker Pools.
A hands-on tour in the style of Go by Example. Glojure is a Clojure interpreter hosted on Go.