Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion challenge.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import time


def finish_date():
def finish_date(func):
# You have to code here!!
def wrapper(*args, **kwargs):

initial_time = time.time()
func(*args, **kwargs)
final_time = time.time()
duration = final_time - initial_time
local_time = time.localtime()
finalization_time = time.strftime("%d/%m/%Y - %H:%M:%S", local_time)
print('Function {} ended its execution at: {} . And it took {} seconds to be executed'.format(func.__name__, finalization_time, round(duration, 6)))

return wrapper


@finish_date
Expand Down