Code: include/core/TimestepManager.hpp, src/core/TimestepManager.cpp
TimestepManager owns fixed-update timing plus render cadence handling. This branch adds explicit display refresh propagation through:
setDisplayRefreshHz(float hz);The fixed simulation rate remains unchanged; refresh-rate input is used to better quantize VSync-paced render deltas.
startFrame();
while (shouldUpdate()) {
update(getUpdateDeltaTime());
}
if (shouldRender()) {
render(getInterpolationAlpha());
}
endFrame();setTargetFPS(float fps);
setFixedTimestep(float timestep);
setDisplayRefreshHz(float hz);
setSoftwareFrameLimiting(bool enabled);
reset();Useful accessors:
getCurrentFPS()
getFrameTimeMs()
getInterpolationAlpha()
isFrameTimeExcessive()On high-refresh or variable-refresh displays, the real display cadence may differ from the nominal target FPS. Feeding the active refresh rate into TimestepManager reduces drift and micro-jitter without changing gameplay update frequency.