Start the timer.
(self)
| 44 | self.num_intervals = 0 |
| 45 | |
| 46 | def start(self): |
| 47 | """Start the timer.""" |
| 48 | assert not self.started_, f"{self.name_} timer has already been started" |
| 49 | # Measure the previous interval before its events are recorded again. |
| 50 | self._read_latest() |
| 51 | if self.use_host_timer: |
| 52 | self.start_time = time.time() |
| 53 | else: |
| 54 | if self.start_event is None: |
| 55 | event_class = get_accelerator().Event |
| 56 | self.start_event = event_class(enable_timing=True) |
| 57 | self.start_event.record() |
| 58 | self.started_ = True |
| 59 | |
| 60 | def stop(self, reset=False, record=False): |
| 61 | """Stop the timer.""" |
nothing calls this directly
no test coverage detected