diff --git a/Orange/widgets/tests/base.py b/Orange/widgets/tests/base.py index 117bd5db5fb..a0be2f1dde7 100644 --- a/Orange/widgets/tests/base.py +++ b/Orange/widgets/tests/base.py @@ -183,7 +183,7 @@ def process_events(self, until: callable=None, timeout=DEFAULT_TIMEOUT): if until is None: until = lambda: True - started = time.clock() + started = time.perf_counter() while True: app.processEvents() try: @@ -192,7 +192,7 @@ def process_events(self, until: callable=None, timeout=DEFAULT_TIMEOUT): return result except Exception: # until can fail with anything; pylint: disable=broad-except pass - if (time.clock() - started) * 1000 > timeout: + if (time.perf_counter() - started) * 1000 > timeout: raise TimeoutError() time.sleep(.05)