Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- mon.setTextScale(4)
- x = 0 -- x is seconds
- y = 0 -- y is minutes
- z = 0 -- z is hours
- while true do
- mon.clear()
- mon.setCursorPos(1, 1)
- mon.print(z..":"..y..":"..x)
- sleep(1)
- x = x + 1
- if x == 60 then
- x = 0
- y = y + 1
- end
- if y == 60 then
- y = 0
- z = z + 1
- if z == 24 then
- z = 0
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment