Skip to content

Instantly share code, notes, and snippets.

@jbowens
Created April 3, 2015 23:26
Show Gist options
  • Save jbowens/b15399a7e722aafab509 to your computer and use it in GitHub Desktop.
Save jbowens/b15399a7e722aafab509 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
timer := time.NewTicker(time.Second)
for now := range timer.C {
fmt.Printf("The time is %s\n", now)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment