Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import time
  2.  
  3. t0 = t1 = 0
  4.  
  5. def start():
  6. global t0
  7. t0 = time.time()
  8.  
  9. def finish():
  10. global t1
  11. t1 = time.time()
  12.  
  13. def seconds():
  14. return int(t1 - t0)
  15.  
  16. def milli():
  17. return int((t1 - t0) * 1000)
  18.  
  19. def micro():
  20. return int((t1 - t0) * 1000000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement