[pypy-commit] pypy py3.5: Fix translation; millisecs should be ints.
amauryfa
pypy.commits at gmail.com
Sat Apr 1 15:30:04 EDT 2017
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.5
Changeset: r90907:6c201838bca7
Date: 2017-04-01 21:29 +0200
http://bitbucket.org/pypy/pypy/changeset/6c201838bca7/
Log: Fix translation; millisecs should be ints.
diff --git a/pypy/module/time/interp_time.py b/pypy/module/time/interp_time.py
--- a/pypy/module/time/interp_time.py
+++ b/pypy/module/time/interp_time.py
@@ -465,10 +465,10 @@
main_thread = space.fromcache(State).main_thread
interruptible = (main_thread == thread.get_ident())
millisecs = int(secs * 1000)
- if millisecs == 0.0 or not interruptible:
+ if millisecs == 0 or not interruptible:
rtime.sleep(secs)
break
- MAX = sys.maxint / 1000.0 # > 24 days
+ MAX = int(sys.maxint / 1000) # > 24 days
if millisecs > MAX:
millisecs = MAX
interrupt_event = space.fromcache(State).get_interrupt_event()
More information about the pypy-commit
mailing list