mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
Don't sleep if msecs <= 0.
This commit is contained in:
parent
fb9149c401
commit
001fa6a20f
2 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,7 @@ def delayfunc(msecs):
|
|||
# Use millisleep for very short delays or if there are no windows
|
||||
#
|
||||
if msecs < 100 or WindowParent.CountWindows() = 0:
|
||||
if msecs > 0:
|
||||
time.millisleep(msecs)
|
||||
return
|
||||
#
|
||||
|
|
|
@ -22,6 +22,7 @@ def delayfunc(msecs):
|
|||
# Use millisleep for very short delays or if there are no windows
|
||||
#
|
||||
if msecs < 100 or WindowParent.CountWindows() = 0:
|
||||
if msecs > 0:
|
||||
time.millisleep(msecs)
|
||||
return
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue