RosettaCodeData/Task/Sleep/Cache-ObjectScript/sleep.cos

8 lines
391 B
Plaintext

SLEEP
; the HANG command can use fractional seconds; the Awake line will be slightly off due to processing time
read "How long to sleep in seconds?: ",sleep
write !,"Sleeping... time is "_$ztime($piece($ztimestamp,",",2,2),1,2)
hang +sleep ; use + to cast numeric, if non-numeric will hang 0
write !,"Awake! Time is "_$ztime($piece($ztimestamp,",",2,2),1,2)
quit