Trait kernel::time::hrtimer::ScopedHrTimerPointer
source · pub unsafe trait ScopedHrTimerPointer {
// Required method
fn start_scoped<T, F>(self, expires: Ktime, f: F) -> T
where F: FnOnce() -> T;
}
Expand description
A trait for stack allocated timers.
§Safety
Implementers must ensure that start_scoped
does not return until the
timer is dead and the timer handler is not running.
Required Methods§
sourcefn start_scoped<T, F>(self, expires: Ktime, f: F) -> Twhere
F: FnOnce() -> T,
fn start_scoped<T, F>(self, expires: Ktime, f: F) -> Twhere
F: FnOnce() -> T,
Start the timer to run after expires
time units and immediately
after call f
. When f
returns, the timer is cancelled.
Object Safety§
This trait is not object safe.