Show a speedrun timer that never runs ahead of the real time
A level timer that rounds, adds up small float values or counts while paused shows times that differ between runs and from the replay. This entry counts whole steps, shows the time cut down rather than rounded, and handles runs longer than an hour.
Why this works
Time that is counted in whole steps cannot drift, because whole numbers add up exactly. The same run then gives the same time on every machine, and cutting instead of rounding means the clock never shows a moment that has not yet happened.
When not to use it
Skip it for a clock that should match real wall time, like a countdown to a live event or a daily reset. Count real seconds there. A loose timer that only gives a rough feel of speed needs none of this either.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 15 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Show a speedrun timer that never runs ahead of the real time" (read_entry action-run-timer-whole-ticks) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP