I\'m just trying to time a piece of code. The pseudocode looks like:
start = get_ticks() do_long_code() print \"It took \" + (get_ticks() - start) + \" secon
What you need is time() function from time module:
time()
time
import time start = time.time() do_long_code() print "it took", time.time() - start, "seconds."
You can use timeit module for more options though.