fork download
  1. package main
  2. import "fmt"
  3. import "time"
  4.  
  5. func ready(w string, sec int) {
  6. time.Sleep(int64(sec) * 1e9)
  7. fmt.Println(w, "is ready!")
  8. }
  9.  
  10. func main() {
  11. go ready("Tea", 2)
  12. go ready("Coffee", 1)
  13. fmt.Println("I'm Waiting")
  14. time.Sleep(5 * 1e9)
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.go:15: missing newline at end of file
stdout
Standard output is empty