first_cycle : Cycle
Initial cycle sample used before any simulation time has elapsed.
Helpers for working with the monotonic clock.
These convert nanosecond durations and monotonic clock samples into seconds
(F32) for animation and simulation math. The platform samples a Cycle
once per host cycle and hands it over as input.time; everything else here
is arithmetic on those numbers.
first_cycle : Cycle
Initial cycle sample used before any simulation time has elapsed.
to_seconds : U64 -> F32
Convert a nanosecond duration to seconds.
expect Time.to_seconds(500_000_000) == 0.5
delta_seconds : U64, U64 -> F32
Seconds elapsed between two clock samples. current must be at or after
previous. Derive a delta from consecutive timestamp samples:
dt = Time.delta_seconds(model.last_tick, timestamp_nanos)
Timing samples attached to one host cycle.