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

[help] time based lock program

Started by rex41043, 11 April 2012 - 07:52 PM
rex41043 #1
Posted 11 April 2012 - 09:52 PM
i was working on a program that can tell time but i cant get it to work heres the code

if os.time() < 1700 then
print("night time")
elseif os.time() > 1700 then
print("day time")
end
end
Luanub #2
Posted 11 April 2012 - 09:58 PM
the output from os.time() is in decimals, so 8 am = 8.0 1700 would be 17