From: Guido van Rossum Date: Sun, 21 Apr 1991 19:31:10 +0000 (+0000) Subject: Don't sleep if msecs <= 0. X-Git-Tag: v0.9.8~969 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=001fa6a20f041c81a83ceec282f88211ec8c2079;p=thirdparty%2FPython%2Fcpython.git Don't sleep if msecs <= 0. --- diff --git a/Lib/lib-stdwin/WindowSched.py b/Lib/lib-stdwin/WindowSched.py index 19be2b183308..8c9151cedf4b 100644 --- a/Lib/lib-stdwin/WindowSched.py +++ b/Lib/lib-stdwin/WindowSched.py @@ -22,7 +22,8 @@ def delayfunc(msecs): # Use millisleep for very short delays or if there are no windows # if msecs < 100 or WindowParent.CountWindows() = 0: - time.millisleep(msecs) + if msecs > 0: + time.millisleep(msecs) return # # Post a timer event on an arbitrary window and wait for it diff --git a/Lib/stdwin/WindowSched.py b/Lib/stdwin/WindowSched.py index 19be2b183308..8c9151cedf4b 100755 --- a/Lib/stdwin/WindowSched.py +++ b/Lib/stdwin/WindowSched.py @@ -22,7 +22,8 @@ def delayfunc(msecs): # Use millisleep for very short delays or if there are no windows # if msecs < 100 or WindowParent.CountWindows() = 0: - time.millisleep(msecs) + if msecs > 0: + time.millisleep(msecs) return # # Post a timer event on an arbitrary window and wait for it