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:
long timeBefore = System.currentTimeMillis();
long timeAfter = System.currentTimeMillis();
elapsed time = timeAfter - timeBefore;
Equivalent in python would be:
>>> import time >>> tic = time.clock() >>> toc = time.clock() >>> toc - tic
It's not clear what are you trying to do that for? Are you trying to find the best performing method? Then you should prob have a look at