pub fn set_timeout(delay_ms: i32, callback: impl Fn() + 'static) -> TimerHandleExpand description
Schedules a one-shot callback on the application UI queue.
Store the returned handle when cancellation is required. Recurring work must schedule its next timeout explicitly.
use fui::prelude::*;
let timer = set_timeout(250, || {
// Mutate retained application state, then invalidate affected UI.
});
assert!(cancel_timeout(timer));