You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
365 B

package main
import (
"fmt"
"log"
"os"
"strconv"
"time"
)
func main() {
wait := 1
if len(os.Args) > 1 {
wait = Atoi(os.Args[1])
}
time.Sleep(time.Minute * time.Duration(wait))
fmt.Println("Done waiting")
}
func Atoi(i string) int {
var ret int
var err error
if ret, err = strconv.Atoi(i); err != nil {
log.Fatal("Invalid Atoi")
}
return ret
}