I\'m new to Python, and confused by the date/time documentation. I want to compute the time that it takes to perform a computation.
In java, I would write:
For some further information on how to determine the processing time, and a comparison of a few methods (some mentioned already in the answers of this post) - specifically, the difference between:
start = time.time()
versus the now obsolete (as of 3.3, time.clock() is deprecated)
start = time.clock()
see this other article on Stackoverflow here:
Python - time.clock() vs. time.time() - accuracy?
If nothing else, this will work good:
start = time.time()
... do something
elapsed = (time.time() - start)