Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #time #executed #function
ADD COMMENT
Topic
Name
2+1 =