mirror of
https://github.com/python/cpython.git
synced 2025-07-18 16:55:20 +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,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue