Skip to content

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 availability
  • HeartbeatInitialized: bool that represents if the Heartbeat loop has been initialized
  • Functions: table used to store assigned functions
  • Events: table used to store assigned function connections
  • CurrentFrame: number that represents the order of the frame currently being ran
  • LoopedFrameFunctions: table used to store looped functions
  • FrameFunctions: table used to store temporary functions
  • DelayedFunctions: 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.

Back to top