Same as [`elapsed_time_f32`](Self::elapsed_time_f32) except returns the time as a [`Duration`].
(&self, start: &Self)
| 287 | |
| 288 | /// Same as [`elapsed_time_f32`](Self::elapsed_time_f32) except returns the time as a [`Duration`]. |
| 289 | pub fn elapsed(&self, start: &Self) -> CudaResult<Duration> { |
| 290 | let time_f32 = self.elapsed_time_f32(start)?; |
| 291 | // multiply to nanos to preserve as much precision as possible |
| 292 | Ok(Duration::from_nanos((time_f32 * 1e6) as u64)) |
| 293 | } |
| 294 | |
| 295 | // Get the inner `CUevent` from the `Event`. |
| 296 | // |
no test coverage detected