Home

# Class goog.async.Delay

A Delay object invokes the associated function after a specified delay. The interval duration can be specified once in the constructor, or can be defined each time the delay is started. Calling start on an active delay will reset the timer.

extends goog.Disposable

Instance Method Summary
| `disposeInternal()` Disposes of the object, cancelling the timeout if it is still outstanding and removing all object references.
| `doAction_()` Invokes the callback function after the delay successfully completes.
| `fire()` Fires delay's action even if timer has already gone off or has not been started yet; guarantees action firing. Stops the delay timer.
| `fireIfActive()` Fires delay's action only if timer is currently active. Stops the delay timer.
| `isActive() ⇒ boolean`
| `start(number= opt_interval)` Starts the delay timer. The provided listener function will be called after the specified interval. Calling start on an active timer will reset the delay interval.
| `stop()` Stops the delay timer if it is active. No action is taken if the timer is not in use.