blob: 6377ab1e183da156f17c0c21da1df6ca2d6e997a [file] [log] [blame]
// Title: Sleep
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
for i := 0; i < 10; i++ {
dur := time.Duration(rand.Intn(1000)) * time.Millisecond
fmt.Printf("Sleeping for %v\n", dur)
// Sleep for a random duration between 0-1000ms
time.Sleep(dur)
}
fmt.Println("Done!")
}