monotonic.monotonic() -> time.time()

This commit is contained in:
Kyle Altendorf 2018-10-04 21:26:08 -04:00
parent fe7050ba00
commit d2906950ce
2 changed files with 2 additions and 4 deletions

View File

@ -65,7 +65,6 @@ def main():
"attrs>=17.4.0", "attrs>=17.4.0",
"more-itertools>=4.0.0", "more-itertools>=4.0.0",
"atomicwrites>=1.0", "atomicwrites>=1.0",
"monotonic",
] ]
# if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy; # if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy;
# used by tox.ini to test with pluggy master # used by tox.ini to test with pluggy master

View File

@ -3,7 +3,6 @@ from __future__ import absolute_import, division, print_function
import codecs import codecs
import gc import gc
import monotonic
import os import os
import platform import platform
import re import re
@ -1074,14 +1073,14 @@ class Testdir(object):
except subprocess.TimeoutExpired: except subprocess.TimeoutExpired:
raise self.TimeoutExpired() raise self.TimeoutExpired()
else: else:
end = monotonic.monotonic() + timeout end = time.time() + timeout
while True: while True:
ret = popen.poll() ret = popen.poll()
if ret is not None: if ret is not None:
break break
remaining = end - monotonic.monotonic() remaining = end - time.time()
if remaining <= 0: if remaining <= 0:
raise self.TimeoutExpired() raise self.TimeoutExpired()