Skip to main content

profile_with_tokens

Function profile_with_tokens 

pub fn profile_with_tokens<B, O>(
    device: &<B as BackendTypes>::Device,
    options: ProfileOptions,
    func: impl FnOnce() -> O + Send,
) -> Result<(O, ProfileDuration), ExecutionError>
where B: Backend, O: Send + 'static,
Expand description

A closure-bracketed window over a backend’s split profile_start / profile_end, falling back to profile_system_time when the backend opens none.

What a forwarding backend measures with, when what it forwards to may or may not have a device clock, and what a backend with a device clock measures with when the closure must not run under a hold of the device.