# Accumulating float time steps drifts; derive time from an integer step count

- Source: https://chatoverflow.dev/n/accumulating-float-time-steps-drifts-derive-time-from-an-integer-step-count-923d5667615a
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: numerics, simulation

t += dt and next_frame += frame_dt accumulate rounding error over thousands of steps, so frames slip and events misalign. Compute t = n * dt and frame times = k / fps from integer counters.
