13 lines
359 B
Text
13 lines
359 B
Text
^|The pause command takes milliseconds, we adjust to seconds|^
|
|
fun main ← int by List args
|
|
int seconds
|
|
if args.length æ 1 do seconds ← int!args[0] end
|
|
if seconds æ 0
|
|
seconds ← ask(int, "Enter number of seconds to sleep: ")
|
|
end
|
|
writeLine("Sleeping...")
|
|
pause(1000 * seconds)
|
|
writeLine("Awake!")
|
|
return 0
|
|
end
|
|
exit main(Runtime.args)
|