chainsol

Untitled

Oct 4th, 2017
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. import timeit
  2. def wrapper(func, *args, **kwargs):
  3.     def wrapped():
  4.         func(*args, **kwargs)
  5.     return wrapped
  6.  
  7. looker = here.search('orc')
  8. wrapped = wrapper(looker.execute_cmd, 'look')
  9. self.msg( timeit.timeit(wrapped, number=10) )
  10.  
  11. :fi 3
  12. :fi 4
  13. :fi 4
  14. :fi 5
Advertisement
Add Comment
Please, Sign In to add comment