Created
August 24, 2019 21:25
-
-
Save alexZajac/f5b594307848f0b23b9ca4fea202633d to your computer and use it in GitHub Desktop.
This file contains 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
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