Skip to main content

SlaveClock

Slave clock on the client

Functions

new

SlaveClock.new(
remoteEventRemoteEvent,
remoteFunctionRemoteFunction
) → SlaveClock

Constructs a new SlaveClock

TickToSyncedTime

SlaveClock:TickToSyncedTime(syncedTimenumber) → number

Converts the syncedTime to the original tick value.

GetTime

SlaveClock:GetTime() → number

Returns the sycncronized time

IsSynced

SlaveClock:IsSynced() → boolean

Returns true if the manager has synced with the server

GetPing

SlaveClock:GetPing() → number

Returns estimated ping in seconds

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new SlaveClock",
            "params": [
                {
                    "name": "remoteEvent",
                    "desc": "",
                    "lua_type": "RemoteEvent"
                },
                {
                    "name": "remoteFunction",
                    "desc": "",
                    "lua_type": "RemoteFunction"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "SlaveClock"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
            }
        },
        {
            "name": "TickToSyncedTime",
            "desc": "Converts the syncedTime to the original tick value.",
            "params": [
                {
                    "name": "syncedTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 46,
                "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
            }
        },
        {
            "name": "GetTime",
            "desc": "Returns the sycncronized time",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 54,
                "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
            }
        },
        {
            "name": "IsSynced",
            "desc": "Returns true if the manager has synced with the server",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 66,
                "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
            }
        },
        {
            "name": "GetPing",
            "desc": "Returns estimated ping in seconds",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 79,
                "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SlaveClock",
    "desc": "Slave clock on the client",
    "source": {
        "line": 5,
        "path": "src/timesyncservice/src/Shared/Clocks/SlaveClock.lua"
    }
}