From b215cbc5022148bff6fe6986780794fa80e75b2b Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 30 Aug 2018 10:48:27 -0600 Subject: Rework the time.clock -> time.perf_counter change Signed-off-by: Mats Wichmann --- runtest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'runtest.py') diff --git a/runtest.py b/runtest.py index 1cac45b83..697b872e2 100755 --- a/runtest.py +++ b/runtest.py @@ -95,10 +95,8 @@ import time import threading try: # python3 from queue import Queue - PY3=True except ImportError as e: # python2 from Queue import Queue - PY3=False import subprocess cwd = os.getcwd() @@ -771,7 +769,8 @@ os.environ["python_executable"] = python # but time.time() does a better job on Linux systems, so let that be # the non-Windows default. -if PY3: +#TODO: clean up when py2 support is dropped +try: time_func = time.perf_counter else: if sys.platform == 'win32': -- cgit v1.2.1