You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sikvelsigma edited this page Aug 18, 2022
·
4 revisions
Summery
decorator time_exec
Adds last_call_elapsed, total_time attributes to a function.
Contains
time_exec
frompyuseful.decorators.timingimporttime_exec# 'printout=True' prints 'last_call_elapsed' to console on each call@time_exec(printout=True)deffunc():
sum=0foriinrange(100_000):
sum+=ifunc()