summaryrefslogtreecommitdiff
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index d521deda17..409fea4a5e 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -1131,12 +1131,12 @@ class PydocServerTest(unittest.TestCase):
serverthread = pydoc._start_server(my_url_handler, hostname='0.0.0.0', port=0)
self.assertIn('0.0.0.0', serverthread.docserver.address)
- starttime = time.time()
+ starttime = time.monotonic()
timeout = 1 #seconds
while serverthread.serving:
time.sleep(.01)
- if serverthread.serving and time.time() - starttime > timeout:
+ if serverthread.serving and time.monotonic() - starttime > timeout:
serverthread.stop()
break