pub const TICKS_PER_SECOND: u64 = 60;Expand description
Nominal engine tick (frame) rate, in ticks per second.
The CSS t unit — and azul_core::task::Duration::Tick behind it — counts
FRAMES, not wall time. Nothing needs a real clock to advance a tick; that is
the entire point of the unit. But a tick span still has to be COMPARABLE
against a wall-clock one, because the engine’s interval constants are
milliseconds (Duration::System) and a comparison between the two variants
has to answer something truthful rather than “not yet, forever”.
This constant is the single exchange rate between the two scales, shared by
azul-css (parsing/printing) and azul-core (Duration arithmetic). It is
NOT a clock: nothing reads it to decide when a frame happens, only how many
nanoseconds a frame is worth when the two units must be put side by side.
60 Hz because that is the frame budget the renderer already targets (see the
16_666_667ns scroll-animation step in azul-layout), so 1t is one frame
at the target rate and 60t is exactly one second.