diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-12-17 09:03:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 09:03:04 (GMT) |
commit | be69ff232df23b6ee165d7c34df5435d497cb79b (patch) | |
tree | 705a582be92252ef0b2ffb2ad245c92b27246a61 /Lib/test/test_dummy_thread.py | |
parent | 2d91a1325f7def1cc3762cadf5f5a99a55dac78a (diff) | |
download | cpython-be69ff232df23b6ee165d7c34df5435d497cb79b.zip cpython-be69ff232df23b6ee165d7c34df5435d497cb79b.tar.gz cpython-be69ff232df23b6ee165d7c34df5435d497cb79b.tar.bz2 |
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).
(cherry picked from commit 2cf4c202ffeb30787c944365ba54013688b854c2)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Lib/test/test_dummy_thread.py')
-rw-r--r-- | Lib/test/test_dummy_thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dummy_thread.py b/Lib/test/test_dummy_thread.py index 0840be6..da51216 100644 --- a/Lib/test/test_dummy_thread.py +++ b/Lib/test/test_dummy_thread.py @@ -70,14 +70,14 @@ class LockTests(unittest.TestCase): to_unlock.release() self.lock.acquire() - start_time = int(time.time()) + start_time = int(time.monotonic()) _thread.start_new_thread(delay_unlock,(self.lock, DELAY)) if support.verbose: print() print("*** Waiting for thread to release the lock "\ "(approx. %s sec.) ***" % DELAY) self.lock.acquire() - end_time = int(time.time()) + end_time = int(time.monotonic()) if support.verbose: print("done") self.assertGreaterEqual(end_time - start_time, DELAY, |