(Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()

instead of time.perf_counter()
This commit is contained in:
Victor Stinner 2014-01-21 02:38:33 +01:00
commit 240cae7d17
1 changed files with 2 additions and 2 deletions

View File

@ -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)