diff --git a/challenge.py b/challenge.py index c69287d..e04b7ad 100644 --- a/challenge.py +++ b/challenge.py @@ -1,9 +1,13 @@ -import time +from time import strftime, localtime, time -def finish_date(): +def finish_date(func): # You have to code here!! - + def wrapper(*args, **kwargs): + print( strftime(f" inicio function {func.__name__} %d/%m/%Y %H:%M:%S", localtime(time()))) + func(*args, **kwargs) + print( strftime(f" finalizo la funcion {func.__name__} %d/%m/%Y %H:%M:%S", localtime(time()))) + return wrapper @finish_date def palindrome(string): @@ -13,7 +17,7 @@ def palindrome(string): @finish_date def long_function(): - for _ in range(1000000): + for _ in range(1000000000): pass