""" <snipped> time.clock() isn't high enough resolution for Ubuntu, and time.time() isn't high enough resolution on windows.
Take a look at datetime. It is good to the micro-second on Linux and milli-second on Windows. """ import datetime begin_time=datetime.datetime.now() for j in range(100000): x = j+1 # wait a small amount of time print "Elapsed time =", datetime.datetime.now()-begin_time ## You can also access the individual time values print begin_time.second print begin_time.microsecond ## etc. -- http://mail.python.org/mailman/listinfo/python-list