Decorator for python method runtime
- Windows/Linux/OSX
- Python 3.x
Check it on Pypi.
$ pip install JCOtimer
from JCOtimer.timer import timer
@timer #use as decorator
def foo():
print('bar' * 999999)
foo() # returns 'Time it took to run the function: 0.4072580337524414 secs'
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.