[pypy-commit] pypy py3k: cleanup

pjenvey noreply at buildbot.pypy.org
Wed Mar 13 03:02:32 CET 2013


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r62325:8c7f79ebe9ad
Date: 2013-03-12 19:02 -0700
http://bitbucket.org/pypy/pypy/changeset/8c7f79ebe9ad/

Log:	cleanup

diff --git a/pypy/module/thread/os_lock.py b/pypy/module/thread/os_lock.py
--- a/pypy/module/thread/os_lock.py
+++ b/pypy/module/thread/os_lock.py
@@ -55,12 +55,12 @@
 
 def acquire_timed(lock, microseconds):
     """Helper to acquire an interruptible lock with a timeout."""
-    endtime = (time.time() * 1000000) + microseconds
+    endtime = (time.time() * 1e6) + microseconds
     while True:
         result = lock.acquire_timed(microseconds)
         if result == RPY_LOCK_INTR:
             if microseconds >= 0:
-                microseconds = r_longlong(endtime - (time.time() * 1000000))
+                microseconds = r_longlong(endtime - (time.time() * 1e6))
                 # Check for negative values, since those mean block
                 # forever
                 if microseconds <= 0:


More information about the pypy-commit mailing list