X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=stopwatch.py;h=1326cb1fec8ffb41db461f99aac59372ded655f1;hb=b10d30a46e601c9ee1f843241f2d69a1f90f7a94;hp=752c7ed2d39268364d801391ce108768d2763f0c;hpb=0e451d3b3bf899b3d9ac0c38e3c3cd9d9be170ba;p=python_utils.git diff --git a/stopwatch.py b/stopwatch.py index 752c7ed..1326cb1 100644 --- a/stopwatch.py +++ b/stopwatch.py @@ -16,7 +16,6 @@ class Timer(object): def __init__(self) -> None: self.start = None self.end = None - pass def __enter__(self) -> Callable[[], float]: self.start = time.perf_counter() @@ -25,4 +24,4 @@ class Timer(object): def __exit__(self, *args) -> bool: self.end = time.perf_counter() - return True + return None # don't suppress exceptions