Start timing for the given label.
(self, label: str)
| 77 | self._start_times: dict[str, float] = {} |
| 78 | |
| 79 | def start(self, label: str) -> None: |
| 80 | """Start timing for the given label.""" |
| 81 | if label in self._start_times: |
| 82 | raise ValueError(f"Timer '{label}' is already running") |
| 83 | self._start_times[label] = time.perf_counter() |
| 84 | |
| 85 | def stop(self, label: str) -> float: |
| 86 | """Stop timing for the given label and return the elapsed time. |
no outgoing calls