Guest User

Untitled

a guest
Jan 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. import time
  2.  
  3. def benchmark(func):
  4. def wrapper(*args, **kwargs):
  5. t = time.clock()
  6. res = func(*args, **kwargs)
  7. print(func.__name__, time.clock() - t)
  8. return res
  9. return wrapper
Add Comment
Please, Sign In to add comment