
June 13th, 2004, 04:31 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
As displayed on the Obsolete modules page you shoud probably use time.clock() at http://docs.python.org/lib/module-time.html
Quote:
clock( )
On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of ``processor time'', depends on that of the C function of the same name, but in any case, this is the function to use for benchmarking Python or timing algorithms.
On Windows, this function returns wall-clock seconds elapsed since the first call to this function, as a floating point number, based on the Win32 function QueryPerformanceCounter(). The resolution is typically better than one microsecond. |
If your trying to get a benchmark for your program or testing how long something takes you might want to to look at the following modules:
http://docs.python.org/lib/module-timeit.html
http://docs.python.org/lib/module-hotshot.html
http://docs.python.org/lib/module-profile.html
You can also do this using pystone which i think should be in the tools directory  .
Please also read the sticky at the top of this forum regarding how to post a question!
http://forums.devshed.com/t131489/s.html
Hope this helps,
Mark.
__________________
programming language development: www.netytan.com – Hula
|