Answers for "python get time executed by function"

0

python get time executed by function

from datetime import datetime
start_time = datetime.now()
# do your work here
end_time = datetime.now()
print('Duration: {}'.format(end_time - start_time))
Posted by: Guest on October-25-2021

Code answers related to "python get time executed by function"

Python Answers by Framework

Browse Popular Code Answers by Language