Time.sleep(0.0125) not available within Linux

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Wed Sep 24 06:18:05 EDT 2008


In message <__KdneWJPotDx0XVnZ2dnUVZ_gGdnZ2d at posted.usinternet>, Grant
Edwards wrote:

> On 2008-09-23, Blubaugh, David A. <dblubaugh at belcan.com> wrote:
> 
>> I was wondering if anyone has come across the issue of not being allowed
>> to have the following within a Python script operating under Linux:
>>
>> time.sleep(0.0125)
> 
> No, I have not.  And I doubt anybody else has.

Just a thought, your minimum sleep time is probably limited by the
resolution of the system "HZ" clock. Type

    less /proc/config.gz

and search for the value of the "CONFIG_HZ" setting. On the Athlon 64
machine I'm using to write this, it's 250, which should allow for sleep
intervals in multiples of 0.004 seconds.



More information about the Python-list mailing list