From: Guido van Rossum Date: Thu, 12 Dec 1996 23:42:20 +0000 (+0000) Subject: Fixed conversion between seconds and milliseconds. X-Git-Tag: v1.5a1~769 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0caa7ec20698f17513cd9ed2612acc65346d8671;p=thirdparty%2FPython%2Fcpython.git Fixed conversion between seconds and milliseconds. --- diff --git a/Lib/lib-stdwin/WindowSched.py b/Lib/lib-stdwin/WindowSched.py index b2fbe7656382..119a41feeb8f 100644 --- a/Lib/lib-stdwin/WindowSched.py +++ b/Lib/lib-stdwin/WindowSched.py @@ -11,6 +11,7 @@ import time # Return immediately when something is done, or when the delay is up. # def delayfunc(msecs): + msecs = int(msecs) # # Check for immediate stdwin event # @@ -36,7 +37,7 @@ def delayfunc(msecs): mainloop.dispatch(event) def millitimer(): - return int(1000 * time.time()) + return time.time() * 1000 q = sched.scheduler(millitimer, delayfunc) diff --git a/Lib/stdwin/WindowSched.py b/Lib/stdwin/WindowSched.py index b2fbe7656382..119a41feeb8f 100755 --- a/Lib/stdwin/WindowSched.py +++ b/Lib/stdwin/WindowSched.py @@ -11,6 +11,7 @@ import time # Return immediately when something is done, or when the delay is up. # def delayfunc(msecs): + msecs = int(msecs) # # Check for immediate stdwin event # @@ -36,7 +37,7 @@ def delayfunc(msecs): mainloop.dispatch(event) def millitimer(): - return int(1000 * time.time()) + return time.time() * 1000 q = sched.scheduler(millitimer, delayfunc)