ecco7777

CC Lag detector

Nov 25th, 2015 (edited)
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("working..")
  2. sec={1,2,3,4,5,6}
  3. while true do
  4. x=1
  5. while x<3 do
  6. term.setCursorPos(1,1)
  7. timeHandle = http.get("http://worldtimeapi.org/api/timezone/Europe/Berlin")
  8. time = textutils.unserializeJSON(timeHandle.readLine())
  9. sec[1]=sec[2]
  10. sec[2]=time.unixtime
  11. print(sec[1],"|",sec[2])
  12. print(sec[2]-sec[1])
  13. term.setCursorPos(1,1)
  14. term.clear()
  15. term.write(sec[2]-sec[1])
  16. sleep(1)
  17. x=x+1
  18. end
  19. end
Add Comment
Please, Sign In to add comment