Wednesday, October 07, 2009

Calculating elapsed Time in python

import time

startTime = time.time()
myWorkHere() #do your work here
endTime = time.time()
print "Total time elapsed = ", endTime - startTime, "seconds."

No comments: