Show raw api
{
"functions": [
{
"name": "Init",
"desc": "Initializes the TimeSyncService",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 31,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
},
{
"name": "IsSynced",
"desc": "Returns true if the clock is synced. If the clock is synced, then it can\nbe retrieved.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 58,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
},
{
"name": "WaitForSyncedClock",
"desc": "Waits for the synced clock, or throws an error.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "MasterClock | SlaveClock"
}
],
"function_type": "method",
"yields": true,
"source": {
"line": 73,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
},
{
"name": "GetSyncedClock",
"desc": "Returns a synced clock if there is one available. Otherwise, returns nil.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "MasterClock | SlaveClock | nil"
}
],
"function_type": "method",
"source": {
"line": 87,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
},
{
"name": "PromiseSyncedClock",
"desc": "Promises a synced clock",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Promise<MasterClock | SlaveClock>"
}
],
"function_type": "method",
"source": {
"line": 105,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
},
{
"name": "Destroy",
"desc": "Cleans up the time syncronization service.",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 159,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
}
],
"properties": [],
"types": [],
"name": "TimeSyncService",
"desc": "Syncronizes time between the server and client. This creates a shared timestamp that can be used to reasonably time\nevents between the server and client.",
"source": {
"line": 7,
"path": "src/timesyncservice/src/Shared/TimeSyncService.lua"
}
}