Advertisement
1lann

go time

Nov 8th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. local function main()
  2.         local function clock()
  3.                 local w = term.getSize()
  4.                 term.setTextColor(colors.gray)
  5.  
  6.                 while true do
  7.                         term.setCursorPos(w - 8, 1)
  8.                         term.setBackgroundColor(colors.black)
  9.                         term.write("             ")
  10.                         term.setCursorPos(w - 8, 1)
  11.                         term.setBackgroundColor(colors.white)
  12.                         term.write(textutils.formatTime(os.time()))
  13.                         waitChannel("term_events", false, 0.2)
  14.                 end
  15.         end
  16.  
  17.         go(clock)
  18.         go(function() shell.run("/rom/programs/shell") end)
  19. end
  20.  
  21. runDispatcher(main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement