The clock
Airtime measures every run on an exact clock: to well under a millisecond, independent of frame rate, network and server frames. Urban Terror's coarser 50 ms time is computed alongside, for comparison with classic UrT records.
The exact clock#
Time is measured in command time, the time the player's own simulation runs on:
- Command time: the touch happens in a command with a known server time (8 ms steps with pmove_fixed). Start = the command that touched START, stop = the command that touched STOP.
- Sub-step interpolation: within that command the player moved from A to B. The game finds
the fraction t where the player box first touched the gate (box vs box sweep, exact) and
uses
time = cmd_start + t · cmd_duration. Resolution far below a millisecond. Defrag and modern surf timers do this kind of interpolation. - The same for checkpoints.
Properties:
- Deterministic: computed from the replay, so the server gets the same number.
- Fair: independent of frame rate, network or server frame timing.
- Shown to the millisecond (
1:23.456).
UrT time (classic comparison)#
How Urban Terror measures:
- The server runs frames every 1000 / sv_fps ms (sv_fps 20 → 50 ms).
ut_jumpstartstoreslevel.time(the last server frame), andut_jumpstoptakeslevel.time − start. So every UrT run time is a multiple of 50 ms, even though the player moves in 8 ms steps and touches triggers per command.
50 ms is coarse: two runs that really differ by 30 ms can show the same time, and a run can lose or gain up to 50 ms depending on where in the server frame the touches fall. That's why the exact clock is the official one. UrT time is still computed exactly as UrT does it, so classic runs compare with UJM and real UrT servers.
| Clock | Used for |
|---|---|
| Exact time | Airtime boards, the HUD, the timetable |
| UrT time (50 ms steps) | comparison with UJM / real UrT servers, imported UrT records |
Both are computed for every run (from the same replay). The scoreboard can show both.
Edge cases#
- Spawning inside a start gate: no start until the player leaves and re-enters (or, with
on: leave, until they leave). - Teleporting into a stop gate: counts at the teleport command (UrT behaviour).
- Touching start and stop in the same command: start wins if it was touched first along the move, else no run.
- Pause / menu: offline, the simulation stops, so the clock stops too. Online, the clock keeps going.
- Save / load in practice runs: the time keeps running; the number of loads is counted.
Open questions#
- Do runs paused offline count on boards, or only as practice?