Premature wakeup of time.sleep()

Peter Hansen peter at engcorp.com
Tue Sep 13 17:04:35 EDT 2005


Bengt Richter wrote:
> On Mon, 12 Sep 2005 19:33:07 -0400, Peter Hansen <peter at engcorp.com> wrote:
> 
> 
>>Steve Horsley wrote:
>>
>>>I think the sleep times are quantised to the granularity of the system 
>>>clock, shich varies from os to os. From memory, windows 95 has a 55mS 
>>>timer, NT is less (19mS?), Linux and solaris 1mS. All this is from 
>>
>>For the record, the correct value for NT/XP family is about 15.6 ms 
>>(possibly exactly 64 per second and thus 15.625ms, but offhand I don't 
>>recall, though I'm sure Google does).
>>
> 
> What "correct value" are you referring to? The clock chip interrupts,
> clock chip resolution, or OS scheduling/dispatching?

The resolution of the call to time.time(), basically.

> For NT4 at least, I don't know of anything near 15.6 ms ;-)

Apparently my belief that XP was the same as NT is incorrect then.  The 
value is definitely correct for XP (on my machine anyway ;-)  ).

-Peter



More information about the Python-list mailing list