[pypy-svn] r64367 - in pypy/trunk/pypy/rpython/module: . test
arigo at codespeak.net
arigo at codespeak.net
Sun Apr 19 15:14:27 CEST 2009
Author: arigo
Date: Sun Apr 19 15:14:26 2009
New Revision: 64367
Modified:
pypy/trunk/pypy/rpython/module/ll_time.py
pypy/trunk/pypy/rpython/module/test/test_ll_time.py
Log:
According to the MS doc, we need to include sys/types.h too.
Modified: pypy/trunk/pypy/rpython/module/ll_time.py
==============================================================================
--- pypy/trunk/pypy/rpython/module/ll_time.py (original)
+++ pypy/trunk/pypy/rpython/module/ll_time.py Sun Apr 19 15:14:26 2009
@@ -14,7 +14,7 @@
if sys.platform == 'win32':
TIME_H = 'time.h'
FTIME = '_ftime64'
- includes = [TIME_H, 'windows.h', 'sys/timeb.h']
+ includes = [TIME_H, 'windows.h', 'sys/types.h', 'sys/timeb.h']
else:
TIME_H = 'sys/time.h'
FTIME = 'ftime'
Modified: pypy/trunk/pypy/rpython/module/test/test_ll_time.py
==============================================================================
--- pypy/trunk/pypy/rpython/module/test/test_ll_time.py (original)
+++ pypy/trunk/pypy/rpython/module/test/test_ll_time.py Sun Apr 19 15:14:26 2009
@@ -41,6 +41,13 @@
assert t0 <= t1
assert t1 - t0 >= 0.15
+ if sys.platform == "win32":
+ def test_time_is_a_float(self):
+ r1 = time.time()
+ time.sleep(0.01)
+ r2 = time.time()
+ assert r1 < r2 < r1 + 1
+
class TestLLType(BaseTestTime, LLRtypeMixin):
pass
More information about the Pypy-commit
mailing list