Re: [python-win32] sleep() for less than .001s?

2006-08-04 Thread RayS
At 02:59 AM 8/4/2006, Gabriel Genellina wrote: I'm not sure if this really works, but you could try: - Raise your thread/process's priority using SetPriorityClass or SetThreadPriority. This is to minimize the (unpredictable) delay of sleep() I do launch the module with CreateProcess with

Re: [python-win32] sleep() for less than .001s?

2006-08-04 Thread Ray Schumacher
At 11:01 AM 8/4/2006, Tim Roberts wrote: What surprises you? The Win32 Sleep() function takes integer milliseconds. Thus, .1 will round to 0, which says give up the CPU only if a higher-priority task is waiting.. The default scheduling interval on your system is 16ms. Some Windows

[python-win32] sleep() for less than .001s?

2006-08-03 Thread Ray Schumacher
I have been trying to use sleep() and kernel32.QueryPerformanceCounter together; I want to delay until a particular tick without trying up the CPU badly. However, while time.sleep(.001) relieves the CPU, it has wildly unpredictable delay, and sleep(.0001) delays almost nothing at all! (I'm