Manages scheduling and execution of tasks
| Name | Type | Value | Description |
|---|---|---|---|
QUERY_INTERVAL |
Integer | 1000 |
Time (ms) interval for ticks |
SLEEP_THRESHOLD |
Integer | 60000 |
Time (ms) threshold to execute tasks after app has been asleep/inactive for |
_jQueryCleanupTaskId |
String | specific to local | ID of the task that manages cleanup of jQuery fragments |
_lastTickTime |
Integer | specific to local | Time (ms) value of the last passed tick |
_tasks |
Object | - | Object containing all tasks that are run periodically |
Description:
Sets the _lastTickTime to current unix time, adds the jQuery cleanup task and sets _jQueryCleanupTaskId
Parameters:
taskIDString
Description:
Removes the task with ID taskID
Parameters:
taskIDString
Description:
Restarts the task with ID taskID
Parameters:
intervalIntegerfuncFunction- ??? (optional)
Description:
Creates a task that is executes func with the set interval
Description:
This function initializes the interval for the scheduler
Parameters:
taskIDStringintervalIntegerfuncFunction
Description:
Update task with the ID taskID to have a new interval and/or func
Parameters:
taskObject
Description:
Executes the callback function of specified task
Description:
Handles ticks and executes callback functions if required