Author: Armin Rigo <[email protected]>
Branch: py3k
Changeset: r87305:5fe4864fbac4
Date: 2016-09-22 09:43 +0200
http://bitbucket.org/pypy/pypy/changeset/5fe4864fbac4/
Log: next attempt
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
@@ -292,12 +292,12 @@
_setinfo(space, w_info, "gettimeofday()", 1e-6, False,
True)
return space.wrap(
widen(timeval.c_tv_sec) +
- int(timeval.c_tv_usec) * 1e-6)
+ widen(timeval.c_tv_usec) * 1e-6)
if HAVE_FTIME:
with lltype.scoped_alloc(TIMEB) as t:
c_ftime(t)
result = (widen(t.c_time) +
- int(t.c_millitm) * 0.001)
+ widen(t.c_millitm) * 0.001)
if w_info is not None:
_setinfo(space, w_info, "ftime()", 1e-3,
False, True)
@@ -739,7 +739,7 @@
if HAS_CLOCK_GETTIME:
def _timespec_to_seconds(timespec):
- return widen(timespec.c_tv_sec) + int(timespec.c_tv_nsec) * 1e-9
+ return widen(timespec.c_tv_sec) + widen(timespec.c_tv_nsec) * 1e-9
@unwrap_spec(clk_id='c_int')
def clock_gettime(space, clk_id):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit