Class rio.DelayedTask
DelayedTask will execute a function after a delay. Every time delay is called, any pending execution
will be canceled.
Defined in: delayed_task.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
cancel()
Cancels the queued task
|
|
delay(delayLength, task, scope, args)
Executes the passed in task after a delay.
|
Method Detail
cancel()
Cancels the queued task
delay(delayLength, task, scope, args)
Executes the passed in task after a delay. This will also cancel any pending tasks.
- Parameters:
- {Number} delayLength
- The delay in milliseconds
- {Function} task
- Task to execute after the delay
- {Object} scope
- (optional) The scope in which to execute the task
- {Array} args
- (optional) Arguments to pass into the task function