Skip to content

Instantly share code, notes, and snippets.

@dearing
Created February 1, 2015 02:04
Show Gist options
  • Save dearing/f98d50120b2a8ee4bc92 to your computer and use it in GitHub Desktop.
Save dearing/f98d50120b2a8ee4bc92 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("Hello World!")
fmt.Println("Testing the editor...")
go test("is this bitches?", 1*time.Second)
go test("whoa!", 5*time.Second)
go test("bitches", 100*time.Millisecond)
time.Sleep(1 * time.Minute)
}
func test(msg string, delay time.Duration) {
c := time.Tick(1 * delay)
for now := range c {
fmt.Println(now.Unix(), msg)
// blah blah blah
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment