Expand description
The per-frame Time resource — the engine’s single clock.
Time carries the real wall-clock frame delta, the fixed simulation
step, and the render-interpolation factor. It is the bridge between the
decoupled fixed-timestep simulation and the variable-rate render:
- The simulation advances in whole
fixed_delta_secondssteps via an accumulator in the scheduler, so it is frame-rate independent (deterministic). - Rendering happens once per frame; to stay smooth between sim steps the
render path blends the previous and current transforms by
interpolation_alpha.
The scheduler publishes a fresh Time each frame; game code and Flows
read it. It lives in Runtime::resources behind an
Arc<RwLock<Time>> so the scheduler (which holds Arc<Runtime>) can
write it while Flows and game update (which borrow &Runtime) read it.
Structs§
- Time
- Per-frame timing state shared between the simulation and the render path.
Constants§
- DEFAULT_
FIXED_ DELTA_ SECONDS - Default fixed simulation step — 60 Hz.
Type Aliases§
- Shared
Time - Shared, interior-mutable handle to the engine’s
Timeresource.