High-resolution timers

Mark Hammond mhammond at skippinet.com.au
Thu Jan 17 04:32:42 CET 2002

Bryan wrote:

> Hi All,
> I am searching for a platform-agnostic high resolution timer module to use 
> in various entropy collection schemes for cryptographic purposes. The 
> standard time module is great on my system ( i686 linux ) :
>>>>import time
> 1011195116.002301
> It gives me microsecond precision, and for that I am grateful. But the 
> module documentation warns:

Use time.clock() - it will always provide the best timer for the 
platform.  The profiler uses this, and it needs the best precision it 
can get.  Python on Windows uses the high-performance counter exposed by 
the Windows API for excellent resolution.


More information about the Python-list mailing list