Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sSide = "back"
- local function printCenter(mon, txt)
- local w, h = mon.getSize()
- local x = math.floor((w / 2) - (#txt / 2))
- local y = math.floor((h / 2))
- mon.setCursorPos(x, y)
- mon.write(txt)
- end
- local monitor = peripheral.wrap(sSide)
- while true do
- shell.run("clear")
- local nTime = os.time()
- printCenter(monitor, textutils.formatTime(nTime, true)))
- sleep(1)
- end
Add Comment
Please, Sign In to add comment