summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-12 23:42:20 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-12 23:42:20 (GMT)
commit0caa7ec20698f17513cd9ed2612acc65346d8671 (patch)
treedb6e1fa5b4d5808661f92b57e768cbc27bc9abc3 /Lib
parent07a0eeceaafd2b57a2024b471a1d34c879464427 (diff)
downloadcpython-0caa7ec20698f17513cd9ed2612acc65346d8671.zip
cpython-0caa7ec20698f17513cd9ed2612acc65346d8671.tar.gz
cpython-0caa7ec20698f17513cd9ed2612acc65346d8671.tar.bz2
Fixed conversion between seconds and milliseconds.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-stdwin/WindowSched.py3
-rwxr-xr-xLib/stdwin/WindowSched.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/lib-stdwin/WindowSched.py b/Lib/lib-stdwin/WindowSched.py
index b2fbe76..119a41f 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 b2fbe76..119a41f 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)