Skip to content

Commit

Permalink
Merge pull request #3041 from ales-erjavec/fixes/tests-process-events…
Browse files Browse the repository at this point in the history
…-wall-time

[FIX] tests: Fix time tracking in process_events
  • Loading branch information
astaric authored May 25, 2018
2 parents 3a68781 + 600412e commit 1289011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Orange/widgets/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

Expand Down

0 comments on commit 1289011

Please sign in to comment.