RosettaCodeData/Task/Sleep/EMal/sleep.emal

14 lines
359 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
^|The pause command takes milliseconds, we adjust to seconds|^
2026-04-30 12:34:36 -04:00
fun main ← int by List args
2023-07-01 11:58:00 -04:00
int seconds
2026-04-30 12:34:36 -04:00
if args.length æ 1 do seconds ← int!args[0] end
if seconds æ 0
seconds ← ask(int, "Enter number of seconds to sleep: ")
2023-07-01 11:58:00 -04:00
end
writeLine("Sleeping...")
pause(1000 * seconds)
writeLine("Awake!")
return 0
end
exit main(Runtime.args)