mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
(Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()
instead of time.perf_counter()
This commit is contained in:
commit
240cae7d17
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue