robocyclone

Computer Time Check

Feb 25th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. local nightTime = 19
  2. local dayTime = 7.3
  3. function returnTime()
  4.     local currTime = os.time()
  5.     if currTime >= dayTime or currTime < nightTime then
  6.         return true
  7.     else
  8.         return false
  9.     end
  10. end
  11.  
  12. while true do
  13.     rs.setOutput("right", returnTime())
  14.     sleep(3)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment