Answer the question
In order to leave comments, you need to log in
How to calculate the total execution time of functions?
Tell me how to get the total execution time of functions (a and b) and how to switch to timeit?
def a():
start_time = time.time()
print("--- %s sec ---" % (time.time() - start_time))
def b():
start_time = time.time()
print("--- %s sec ---" % (time.time() - start_time))
if __name__ == "__main__":
a()
b()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question