Example program to demonstrate how goroutines work.

How to run

go run main.go

Output

Alice has woken up!
Alice has slept for 1s
Bob has woken up!
Bob has slept for 2s
Charlie has woken up!
Charlie has slept for 3s
Diana has woken up!
Diana has slept for 7s
Eve has woken up!
Eve has slept for 9s
Everyone has woken up!
Total time spent sleeping: 9.0010ms