Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get time taken to execute python script

from datetime import datetime
startTime = datetime.now()

#do something

#Python 2: 
print datetime.now() - startTime 

#Python 3: 
print(datetime.now() - startTime)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #time #execute #python #script
ADD COMMENT
Topic
Name
1+1 =