blob: 947ef7e3e9cf4b146d2d9e8b293c5e7862abb07f [file] [log] [blame]
package main
import (
"fmt"
"time"
)
func sleepAndTalk(t time.Duration, msg string) {
time.Sleep(t)
fmt.Printf("%v ", msg)
}
func main() {
sleepAndTalk(0*time.Second, "Hello")
sleepAndTalk(1*time.Second, "Gophers!")
sleepAndTalk(2*time.Second, "What's")
sleepAndTalk(3*time.Second, "up?")
}