pub fn use_timer(interval_ms: u32) -> UseTimerExpand description
Obtains the UseTimer registered against the current hook context
slot.
Behaves like HookContext::use_hook - the same handle is returned on
every render at the same hook index, so the tick count survives
re-renders.
The interval is created once, on the first render, and is cleared automatically when the component unmounts. A period of zero is treated as one millisecond: a zero-delay interval is a busy loop that would starve the renderer.
§Arguments
u32- The period in milliseconds.
§Returns
UseTimer- The handle, withget_ticks()returning the reactiveSignal<u64>.