Static
SYNC_The amount of time to delay before re-syncing the official server time.
The average one-way latency between client and server in milliseconds.
The calendar instance for in-world timekeeping.
The current World time expressed as components.
The "Earth" calendar instance for IRL timekeeping.
The current server time based on the last synchronization point and the approximated one-way latency.
Advance or rewind the world time according to a delta amount expressed either in seconds or as components.
The number of seconds to advance (or rewind if negative) by
Optional
options: objectAdditional options passed to game.settings.set
The new game time
Initialize a calendar configuration. This is called once automatically upon construction, but can be called manually if CONFIG.time changes.
Handle follow-up actions when the official World time is changed
The new canonical World time.
Options passed from the requesting client where the change was made
The ID of the User who advanced the time
Directly set the world time to a certain value expressed either in seconds or as components.
The desired world time
Optional
options: objectAdditional options passed to game.settings.set
The new game time
Synchronize the local client game time with the official time kept by the server
A singleton class at which keeps the official Server and World time stamps. Uses a basic implementation of https://www.geeksforgeeks.org/cristians-algorithm/ for synchronization.
See
foundry.Game#time