This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
arixama's profile picture

trying to set a time using user input

Started by arixama, 25 December 2013 - 10:07 PM
arixama #1
Posted 25 December 2013 - 11:07 PM
im trying to figure out how to get sleep() to accept a user input instead of having a set time.
help please?
Lyqyd #2
Posted 25 December 2013 - 11:15 PM

print("time to sleep?")
local time = read()
sleep(tonumber(time))