Commit 001fa6a2 authored by Guido van Rossum's avatar Guido van Rossum

Don't sleep if msecs <= 0.

parent fb9149c4
...@@ -22,7 +22,8 @@ def delayfunc(msecs): ...@@ -22,7 +22,8 @@ def delayfunc(msecs):
# Use millisleep for very short delays or if there are no windows # Use millisleep for very short delays or if there are no windows
# #
if msecs < 100 or WindowParent.CountWindows() = 0: if msecs < 100 or WindowParent.CountWindows() = 0:
time.millisleep(msecs) if msecs > 0:
time.millisleep(msecs)
return return
# #
# Post a timer event on an arbitrary window and wait for it # Post a timer event on an arbitrary window and wait for it
......
...@@ -22,7 +22,8 @@ def delayfunc(msecs): ...@@ -22,7 +22,8 @@ def delayfunc(msecs):
# Use millisleep for very short delays or if there are no windows # Use millisleep for very short delays or if there are no windows
# #
if msecs < 100 or WindowParent.CountWindows() = 0: if msecs < 100 or WindowParent.CountWindows() = 0:
time.millisleep(msecs) if msecs > 0:
time.millisleep(msecs)
return return
# #
# Post a timer event on an arbitrary window and wait for it # Post a timer event on an arbitrary window and wait for it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment