Skip to content

Commit

Permalink
set default timer to thread_time()
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed May 21, 2022
1 parent d916374 commit 794ff25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from dataclasses import dataclass
from inspect import getframeinfo, stack
from textwrap import dedent
from time import perf_counter
from time import thread_time
from types import TracebackType
from typing import Callable, Optional, Type

Expand Down Expand Up @@ -90,5 +90,5 @@ def __exit__(
assert self.results.passed(), self.results.message()


def assert_maximum_duration(seconds: float, clock: Callable[[], float] = perf_counter) -> AssertMaximumDuration:
def assert_maximum_duration(seconds: float, clock: Callable[[], float] = thread_time) -> AssertMaximumDuration:
return AssertMaximumDuration(seconds=seconds, clock=clock)

0 comments on commit 794ff25

Please sign in to comment.