Calculate the elapsed time.
(self, reset=True)
| 98 | self.event_timers.clear() |
| 99 | |
| 100 | def elapsed(self, reset=True): |
| 101 | """Calculate the elapsed time.""" |
| 102 | started_ = self.started_ |
| 103 | # If the timing in progress, end it first. |
| 104 | if self.started_: |
| 105 | self.stop() |
| 106 | # Get the elapsed time. |
| 107 | elapsed_ = self._get_elapsed_msec() |
| 108 | # Reset the elapsed time |
| 109 | if reset: |
| 110 | self.reset() |
| 111 | # If timing was in progress, set it back. |
| 112 | if started_: |
| 113 | self.start() |
| 114 | return elapsed_ |
| 115 | |
| 116 | def mean(self): |
| 117 | self.elapsed(reset=False) |
nothing calls this directly
no test coverage detected