Class: SchedulerSystem

SchedulerSystem

The SchedulerSystem manages scheduled tasks with specific intervals.

new SchedulerSystem ()

Implements

Methods

cancel (id) void

Cancels a scheduled task.

Name Type Description
id number

The unique identifier of the task to cancel.

init () void

Initializes the scheduler system and starts the ticker.

repeat (func, duration, useOffset) number

Schedules a repeating task.

Name Type Default Description
func (elapsed: number) => void

The function to execute.

duration number

The interval duration in milliseconds.

useOffset boolean true

this will spread out tasks so that they do not all run at the same time

Returns:
Type Description
number The unique identifier for the scheduled task.