summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-01-21 01:38:33 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-01-21 01:38:33 (GMT)
commit240cae7d1732029fc4015262a7ef9f154ebcc7b2 (patch)
tree240ebe40c7997e7bff3bdd60ad11b99bfc26d6aa
parent11da8e24ba1090b9d55f3451345f0724055f125f (diff)
parent39d798eb03e2f389b9d59d005a14eed1467f18cd (diff)
downloadcpython-240cae7d1732029fc4015262a7ef9f154ebcc7b2.zip
cpython-240cae7d1732029fc4015262a7ef9f154ebcc7b2.tar.gz
cpython-240cae7d1732029fc4015262a7ef9f154ebcc7b2.tar.bz2
(Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()
instead of time.perf_counter()
-rw-r--r--Lib/test/test_epoll.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py
index 094b0f0..58dd92f 100644
--- a/Lib/test/test_epoll.py
+++ b/Lib/test/test_epoll.py
@@ -260,9 +260,9 @@ class TestEPoll(unittest.TestCase):
epoll = select.epoll()
self.addCleanup(epoll.close)
for timeout in (1e-2, 1e-3, 1e-4):
- t0 = time.perf_counter()
+ t0 = time.monotonic()
epoll.poll(timeout)
- dt = time.perf_counter() - t0
+ dt = time.monotonic() - t0
self.assertGreaterEqual(dt, timeout)