Skip to main content

Module timer

Module timer 

Source
Expand description

Zero-allocation timer, stopwatch, and fixed-timestep accumulator.

Inspired by Bevy’s bevy_time (Timer, Stopwatch, and fixed step scheduling), adapted for no_std microcontrollers. Works seamlessly with both f32 seconds and core::time::Duration.

Structs§

FixedStepIter
Iterator yielding fixed timesteps for a frame.
FixedTimestep
Accumulator for fixed-timestep game / physics loops (e.g. 50 Hz or 60 Hz).
Stopwatch
Tracks elapsed time with pause, reset, and accumulation controls.
Timer
A timer that tracks duration, progress fraction, completion, and repetition.

Enums§

TimerMode
Behavior of a Timer when its duration is reached.