This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
by Adrian Statescu <[email protected]> | |
Twitter: @thinkphp | |
G+ : http://gplus.to/thinkphp | |
MIT Style License | |
''' | |
''' | |
Binary Search Tree | |
------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def function_time(func, arg=()): | |
''' | |
The simple code that can estimate the computing time of the function and | |
return the same output of original one | |
:param func: The reference of the function you may want to estimate time | |
:param arg: The arguments of function, the default is () | |
:return: Return original output of the function | |
''' | |
t1 = timeit.default_timer() |
NewerOlder