five-on-it / packages/net-client/src/clock / CLOCK_WINDOW_TICKS
Variable: CLOCK_WINDOW_TICKS
constCLOCK_WINDOW_TICKS:120=120
Defined in: packages/net-client/src/clock.ts:88
How long the clock remembers a snapshot's offset (ticks): two seconds, about forty snapshots. Long enough that a burst of late snapshots (a 300 ms stall holds six) or a run of jittered ones is never the whole window, so the earliest arrival in it stays near the server's true offset; short enough that a real change of the offset (the server's loop fallen behind for good, a route change) is followed within a few seconds, and that a discontinuity that outlasts it is taken as one.