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
The time module in python gives you access to the clock() function, which returns time in seconds as a floating point.
Different systems will have different accuracy based on their internal clock setup (ticks per second) but it's generally at least under 20milliseconds, and in some cases better than a few microseconds.
-Adam