function_timer

imagepypelines.function_timer(func)[source]

Decorator to time how long a func takes to run in seconds

Example

>>> import imagepypelines as ip
>>> import time
>>>
>>> @ip.function_timer
... def sleep_for_one_sec():
...    time.sleep(1) #sleep for 1 second
>>>
>>> sleep_for_one_sec() # doctest: +ELLIPSIS
...