UI module

wake_in

procedureextensionexperimentalsince 0.31.0Source

Ask for a frame in seconds even if no input arrives (animation, a blinking caret).

Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
wake_in(*ui, 0.5);   // ask for a frame in half a second
pop_ui();
wake_in :: (ui: *UI_State, seconds: float64)

Ask for a frame in seconds even if no input arrives (animation, a blinking caret).

Parameters

ui: *UI_State
the UI to ask a frame on.
seconds: float64
how long from now. An earlier wake time already asked for is kept.
Example↗
ui := headless();
defer free_ui(*ui);
push_ui(*ui);
wake_in(*ui, 0.5);   // ask for a frame in half a second
pop_ui();

See also