Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import time
  2.  
  3. def procedure():
  4. time.sleep(2.5)
  5.  
  6. # measure process time
  7. t0 = time.clock()
  8. procedure()
  9. print time.clock() - t0, "seconds process time"
  10.  
  11. # measure wall time
  12. t0 = time.time()
  13. procedure()
  14. print time.time() - t0, "seconds wall time"
  15.  
  16. ## 0.0 seconds process time
  17. ## 2.50903499126 seconds wall time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement