DraRex368

Clock system

Feb 22nd, 2021 (edited)
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local time = os.time()
  2. local day = os.day()
  3. local year = day/365
  4. local dayfinal = day % 365
  5.  
  6. mon = peripheral.wrap("bottom")
  7. mon.setTextScale(3,4)
  8.  
  9. while true do
  10.     mon.clear()
  11.     mon.setCursorPos(12,1)
  12.     time = os.time()
  13.     day = os.day()
  14.     mon.write(textutils.formatTime(time))
  15.     mon.setCursorPos(8,2)
  16.     mon.write("Year")
  17.     mon.write(tostring(math.floor(year)))
  18.     mon.write("Day: ")
  19.     mon.write(tostring(dayfinal))
  20.     sleep(1)
  21. end
Add Comment
Please, Sign In to add comment