RosettaCodeData/Task/Sleep/EMal/sleep.emal
2023-07-01 13:44:08 -04:00

13 lines
353 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)