mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)
Replace time.time() with time.monotonic() in tests to measure time delta. test_zipfile64: display progress every minute (60 secs) rather than every 5 minutes (5*60 seconds).
This commit is contained in:
parent
4e80f5cbea
commit
2cf4c202ff
14 changed files with 68 additions and 66 deletions
|
|
@ -70,8 +70,8 @@ def capture_server(evt, buf, serv):
|
|||
pass
|
||||
else:
|
||||
n = 200
|
||||
start = time.time()
|
||||
while n > 0 and time.time() - start < 3.0:
|
||||
start = time.monotonic()
|
||||
while n > 0 and time.monotonic() - start < 3.0:
|
||||
r, w, e = select.select([conn], [], [], 0.1)
|
||||
if r:
|
||||
n -= 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue