MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / elapsed

Method elapsed

crates/cust/src/event.rs:289–293  ·  view source on GitHub ↗

Same as [`elapsed_time_f32`](Self::elapsed_time_f32) except returns the time as a [`Duration`].

(&self, start: &Self)

Source from the content-addressed store, hash-verified

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 //

Callers 4

final_imageMethod · 0.80
renderMethod · 0.80
final_imageMethod · 0.80
renderMethod · 0.80

Calls 1

elapsed_time_f32Method · 0.80

Tested by

no test coverage detected