Skip to content

Instantly share code, notes, and snippets.

@alexZajac
Created August 24, 2019 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexZajac/f5b594307848f0b23b9ca4fea202633d to your computer and use it in GitHub Desktop.
Save alexZajac/f5b594307848f0b23b9ca4fea202633d to your computer and use it in GitHub Desktop.
from decorpy import timer
@timer
def test(n):
sum = 0
for i in range(n):
sum += i
return sum
sum = test(1000)
# Output :
# The time taken for the function 'test' with args {'kwargs': {}, 'args': (1000,), 'func': <function test at 0x000002335C4A49D8>} is 0.000159 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment