Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Title: TangentClock
- --Version: Ver. 2
- --Last Revised: 12/27/2011
- --Last Revised By: TangentDelta (alias Hydrogen)
- --Author: TangentDelta (alias Hydrogen)
- --Platform: ComputerCraft LUA Virtual Machine
- --Notes: Now displays correctly
- minutes = 0
- hours = 0
- function clock()
- for seconds = 0, 60, 1 do
- shell.run("clear")
- print (hours, ":",minutes,">", seconds)
- print ("hours:minutes>seconds")
- if seconds == (60) then
- minutes = minutes + 1
- clock()
- end
- if minutes == (60) then
- hours = hours + 1
- minutes = 0
- end
- sleep (1) --you might want to edit this so that the seconds are more precise
- end
- seconds = 0
- end
- clock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement