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:
If all you want is the time between two points in code (and it seems that's what you want) I have written tic()
toc()
functions ala Matlab's implementation. The basic use case is:
tic()
''' some code that runs for an interesting amount of time '''
toc()
# OUTPUT:
# Elapsed time is: 32.42123 seconds
Super, incredibly easy to use, a sort of fire-and-forget kind of code. It's available on Github's Gist https://gist.github.com/tyleha/5174230