Page MenuHomeFeedback Tracker

Function proposal: systemServerTime - Uses the system clock to prevent high load time drift in MP
New, WishlistPublic

Description

Once a multiplayer server starts filling up, any calls to time or sleep start to become unreliable.

sleep calls take longer than you've specified, and calls to time also show a slower passage of time than is real for the players.

For accurate timing information, we really need a method to retrieve system time from the underlying Windows OS.

I understand internally there are precision restrictions, so I propose a systemServerTime method that could behave like the current serverTime method with one important difference. In this method, the time figure is compared with the system clock, and therefore would eliminate the time drift experienced under high server load.

Hundredths of a second precision would be nice for accurate timing, but second resolution would work as a minimum implementation.

Details

Legacy ID
1174789629
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Multiplayer

Event Timeline

bewilderbeest edited Additional Information. (Show Details)
bewilderbeest set Category to Multiplayer.
bewilderbeest set Reproducibility to N/A.
bewilderbeest set Severity to None.
bewilderbeest set Resolution to Open.
bewilderbeest set Legacy ID to 1174789629.May 7 2016, 4:11 PM

you can use diag_tickTime to get a realiable and accurate time. Internally that uses systemTime.

So this can be marked as resolved. As that is exactly what @bewilderbeest wanted