Firstly synchronize cuda, reset the clock and then start the timer.
(self)
| 25 | return time.time() |
| 26 | |
| 27 | def start(self): |
| 28 | """Firstly synchronize cuda, reset the clock and then start the timer.""" |
| 29 | self._elapsed = 0 |
| 30 | get_accelerator().synchronize() |
| 31 | self._start_time = time.time() |
| 32 | self._started = True |
| 33 | |
| 34 | def lap(self): |
| 35 | """lap time and return elapsed time""" |
no test coverage detected