module timerssource
Timers: functions run as handlers once a clock reaches their time,
kept in a heap by time for each clock, the window's and the wall's;
the app asks the window to wake it at the earliest (wake_at), at
most 5 seconds ahead while one waits for the wall clock. A timer
belongs to the owner making it and goes with it. The clocks ui.clock
gives are signals of the wall clock, set at each event and ticking
through a wall timer only while a binding shown reads them. The wall
clock's heap and the clocks are an extension installed by the first
at or clock, so a program using neither carries none of their code.
fn new_timersource
exp fn new_timer(self ui: &var Ui, at: u64, period: u64, then: |=| (&var Ui)) -> Timer
A timer due at the time on the window's clock, repeating at the period when not 0.
fn drop_timersource
exp fn drop_timer(self ui: &var Ui, timer: Timer) -> bool
Forgets the timer, which then names nothing; whether it was set.
fn run_timerssource
exp fn run_timers(self ui: &var Ui)
Sets the clocks' signals to the wall clock, then runs the timers whose time has come on the window's clock, then those on the wall's, each heap's earliest first, as handlers; those they set for now or before run too. A repeating one is then due a period after it was, past the runs missed.
fn next_duesource
exp fn next_due(self ui: &var Ui) -> Option<Duration>
The earliest time on the window's clock a timer waits for, the clocks read asking for their next tick first; a wait for the wall clock is at most 5 seconds.