Scheduler Time Model
Scheduler Time Model
TimeResource drives fixed and variable time behavior.
Fields
fixedDeltaelapsedframeCountaccumulatormaxCatchUpSteps
Fixed-Step Loop
Per step(dtReal):
- add
dtRealtoelapsed - add
dtRealtoaccumulator - run
FixedUpdatewhileaccumulator >= fixedDeltaand steps <maxCatchUpSteps - if still behind after max steps, drop remainder (
accumulator = 0)
Validation
fixedDeltamust be finite and > 0maxCatchUpStepsmust be integer >= 1step(dt)requires finitedt >= 0
Result
Simulation remains stable under frame-time spikes without runaway catch-up loops.