Skip to content

Commit

Permalink
Update time_boss.py
Browse files Browse the repository at this point in the history
start timing after appending the current instance to the global stack
  • Loading branch information
chrhck authored Oct 28, 2020
1 parent b295a0b commit 18ff580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion time_boss/time_boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def __init__(self, name: str):
TimeBoss.all_timers[name] = self

def __enter__(self):
self._start = perf_counter()
TimeBoss.timer_stack.append(self)
self._start = perf_counter()

def __exit__(self, type, value, traceback):
dt = perf_counter() - self._start
Expand Down

0 comments on commit 18ff580

Please sign in to comment.