monotonic.monotonic() -> time.time()
This commit is contained in:
parent
fe7050ba00
commit
d2906950ce
1
setup.py
1
setup.py
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue