4 from typing import Callable
9 with timer.Timer() as t:
13 print(f'That took {walltime}s.')
16 def __init__(self) -> None:
21 def __enter__(self) -> Callable[[], float]:
22 self.start = time.perf_counter()
24 return lambda: self.end - self.start
26 def __exit__(self, *args) -> bool:
27 self.end = time.perf_counter()