Advertisement
TangentDelta

TangentClock Ver. 1

Dec 27th, 2011
1,167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. --Title: TangentClock
  2. --Version: 1
  3. --Last Revised: N/A
  4. --Last Revised By: N/A
  5. --Author: TangentDelta (alias Hydrogen)
  6. --Platform: ComputerCraft LUA Virtual Machine
  7. --Notes: It's a clock, man!
  8. minutes = 0
  9. hours = 0
  10. function clock()
  11.  for seconds = 0, 60, 1 do
  12.   print (hours, ":",minutes,">", seconds)
  13.   if seconds == (60) then
  14.    minutes = minutes + 1
  15.    clock()
  16.   end
  17.   if minutes == (60) then
  18.    hours = hours + 1
  19.    minutes = 0
  20.   end
  21.  sleep (1) --you might have to edit this if the seconds are off
  22.  end
  23.  seconds = 0
  24. end
  25. clock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement