comparison win32.py @ 142:98bccf81db4d

win32.call() now trusts its own case.time_started
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 25 May 2011 00:27:12 +0100
parents dfde0f5e0984
children
comparison
equal deleted inserted replaced
141:dfde0f5e0984 142:98bccf81db4d
489 else: 489 else:
490 case.process.wait() 490 case.process.wait()
491 else: 491 else:
492 handles = case.process._handle, stdin 492 handles = case.process._handle, stdin
493 if case.maxwalltime: 493 if case.maxwalltime:
494 time_end = clock() + case.maxwalltime 494 time_end = case.time_started + case.maxwalltime
495 while case.process.poll() is None: 495 while case.process.poll() is None:
496 remaining = time_end - clock() 496 remaining = time_end - clock()
497 if remaining > 0: 497 if remaining > 0:
498 if (WaitForMultipleObjects(handles, False, remaining) == 498 if (WaitForMultipleObjects(handles, False, remaining) ==
499 WAIT_OBJECT_0 + 1): 499 WAIT_OBJECT_0 + 1):