Scheduler
The Scheduler library was designed with tasking in mind, in order to allow slow servers to have more accurate polling.
This library is deprecated.
Variables
ReadyStates: table used to store loop availabilityHeartbeatInitialized: bool that represents if the Heartbeat loop has been initializedFunctions: table used to store assigned functionsEvents: table used to store assigned function connectionsCurrentFrame: number that represents the order of the frame currently being ranLoopedFrameFunctions: table used to store looped functionsFrameFunctions: table used to store temporary functionsDelayedFunctions: table used to store delayed functions
Functions
InitializeHeartbeat()
Initializes the Heartbeat loop if not previously initialized.
Assign(Id, Function | function, Looped | bool: true)
Assigns the specified function to the function group with the specified id.
Spawn(Function | function)
FastSpawn implementation.
Toggle(Id, On | bool)
Toggles the specified function group.
Kill(Id)
Kills the specified function group.
Frame(Function | function, Looped | bool: false)
Sets up the specified function to run in the next available frame.
Delay(Time | number, Function | function)
Sets up the specified function to run after the specified amount of time has elapsed. If Time is not passed as an argument, it will default to 0.1.