Win32api,sleep() oddity

Chris Christopher.Cox at honeywell.com
Tue Jul 30 14:12:25 EDT 2002


I use Python embedded in a testing utility on Windows NT4.  We
recently switched PCs to a faster system because of the volume and
intensity of the tests we were running.  The old system was a
PIII-550MHz system and the new is a PIV-1.5GHz system.  We've noticed
that when calling the following funtction:
def wait(Seconds):
	loop = Seconds * 50
	for i in range (0,loop):
		win32api.Sleep(20)
		if win32ui.PumpWaitingMessages(0,-1):
			win32api.PostQuitMessage()
			raise exceptions.SystemExit

on the PIV system, the actual wait is 50% longer than we had requested
(a 10 second wait actually waits 15.55 seconds, 100 seconds waits
155.5 seconds).  IS there some implementation detail in win32api that
might cause this error to arise?  Any help would be appreciated.

Chris



More information about the Python-list mailing list