Created
February 1, 2015 02:04
-
-
Save dearing/f98d50120b2a8ee4bc92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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