Advertisement
Derek1017

Lua

Apr 5th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. function time()
  2.   return textutils.formatTime(os.time(), true)
  3. end
  4.  
  5. local side = 'right'
  6. local mon = peripheral.wrap(side)
  7. local ok, err = pcall( function()
  8.   parallel.waitForAny(
  9.         function()
  10.           while true do
  11.                 mon.clear()
  12.                 mon.setCursorPos(2,3)
  13.                 mon.write(time())
  14.                 sleep(1)
  15.           end
  16.         end,
  17.         function()
  18.           os.run( {}, "rom/programs/lua" )
  19.         end
  20.         )
  21.   end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement