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:
taskID
String
Description:
Removes the task with ID taskID
Parameters:
taskID
String
Description:
Restarts the task with ID taskID
Parameters:
interval
Integerfunc
Function- ??? (optional)
Description:
Creates a task that is executes func
with the set interval
Description:
This function initializes the interval for the scheduler
Parameters:
taskID
Stringinterval
Integerfunc
Function
Description:
Update task with the ID taskID
to have a new interval
and/or func
Parameters:
task
Object
Description:
Executes the callback function of specified task
Description:
Handles ticks and executes callback functions if required