Skip to content

Instantly share code, notes, and snippets.

@chespinoza
Created July 25, 2013 15:54
Show Gist options
  • Save chespinoza/6081141 to your computer and use it in GitHub Desktop.
Save chespinoza/6081141 to your computer and use it in GitHub Desktop.
Ticker demo for repeat some task every n seconds...
package main
import (
"fmt"
"time"
)
func main() {
c := time.Tick(1 * time.Second)
for now := range c {
fmt.Printf("%v %s\n", now, "hola")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment