Advertisement
Guest User

Chrono

a guest
Jul 26th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. s=0
  2. m=0
  3.  
  4. start=false
  5. on=true
  6.  
  7. mon = peripheral.wrap("top")
  8. mon.setTextScale(3)
  9.  
  10. while on == true do
  11.  
  12. if redstone.getInput("right") == true
  13. then
  14. s = ( s + 1 )
  15. if s > 59
  16. then
  17. s = 0
  18. m = (m + 1)
  19. end
  20. end
  21.  
  22. if redstone.getInput("left") == true
  23. then
  24. s = 0
  25. m = 0
  26. end
  27.  
  28. mon.clear()
  29. mon.setCursorPos(2,2)
  30. mon.write("Time lapse:")
  31. mon.setCursorPos(3,3)
  32. if s < 10
  33. then
  34. mon.write( "0" .. m .. ":0".. s)
  35. else
  36. mon.write( "0" .. m ..":" .. s)
  37. sleep(1)
  38.  
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement