If the client’s estimate of the server time is wrong, interpolation timing and cooldown checks drift out of step with the server.
Why The client syncs to server time only once when connecting and never adjusts as ping changes → Effect The point to interpolate to and the time a cooldown ends drift away from the server’s → On screen Opponents occasionally hitch; skills get rejected even after the cooldown has ended
Sync time periodically (measure round-trip time and correct), adjust gradually with no sudden jumps, switch elapsed-time measurement from the PC’s clock to a monotonic clock.
On the graph
Slow climb · Error in the estimated server time
Where to look
Periodically log the difference between the client’s estimated server time and the server time (tick number) the server puts in its packets
Confirmed if
The error grows the longer the session runs, or jumps all at once when the PC clock gets corrected, and reports of rejected skills and hitches rise around then
Ruled out if
Error stays small but skills still get rejected: points to server-side validation or latency
Check with
Game server or client logs and metrics
Learn more
If elapsed time is measured with the PC’s date and time (wall clock), game time jumps the moment Windows corrects the clock against internet time or the user changes the clock. Measure elapsed time with a monotonic clock, which never goes backward (Stopwatch and so on).
Acquiring high-resolution time stampsMicrosoft QueryPerformanceCounter (used by Stopwatch) is a clock for elapsed time that isn’t synced to external time; use system time only when UTC time is needed