Select to view content in your preferred language

I want to write an arcpy script to get the time elapsed for a geoprocessing task

1421
2
Jump to solution
10-08-2013 05:00 AM
OLANIYANOLAKUNLE
Frequent Contributor
I want to calculate the time it takes to run series of geoprocessing tasks and use the result to populate a particular field in my database, any suggestions? Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NeilAyres
MVP Alum
There might be fancier ways but this is the way I do it...
import time t1 = time.time() # do something here t2 = time.time() TimeTakenSecs = t2 - t1 print TimeTakenSecs


Cheers,
Neil

View solution in original post

0 Kudos
2 Replies
NeilAyres
MVP Alum
There might be fancier ways but this is the way I do it...
import time t1 = time.time() # do something here t2 = time.time() TimeTakenSecs = t2 - t1 print TimeTakenSecs


Cheers,
Neil
0 Kudos
OLANIYANOLAKUNLE
Frequent Contributor
There might be fancier ways but this is the way I do it...
import time
t1 = time.time()
# do something here
t2 = time.time()
TimeTakenSecs = t2 - t1
print TimeTakenSecs


Cheers,
Neil


Thanks for the response
0 Kudos