module
timers
Time for templates' timers (every, after, every frame).
The browser installs a Host that uses setTimeout and requestAnimationFrame. Without one, timers wait on a virtual clock that only moves when something calls advance: prerendering never does, so no timer runs at build time, and tests move time on as they need.
Structs
- Host
What runs timers.
Functions
advance
pub fn advance(ms: f64)Move the virtual clock on by ms, a frame (16 ms) at a time, running frames and the timers that come due. Does nothing to a browser's clock.
note_use
pub fn note_use()Note that the page being rendered starts timers (or listens for window events), so it needs the runtime in the browser.
Constants
Type aliases
EachFrame
pub type EachFrame = Box<dyn FnMut(f64) -> bool>;Runs every frame with the time (ms); returns whether to keep going.