Home

# Class goog.Timer

Class for handling timing events.

extends goog.events.EventTarget

Instance Method Summary
| `dispatchTick()` Dispatches the TICK event. This is its own method so subclasses can override.

`disposeInternal()`

Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:

    MyClass.prototype.disposeInternal = function() {
    MyClass.superClass_.disposeInternal.call(this);
    // Dispose logic for MyClass
    };

| `getInterval() ⇒ number` Gets the interval of the timer.
| `setInterval(number interval)` Sets the interval of the timer.
| `start()` Starts the timer.
| `stop()` Stops the timer.
| `tick_()` Callback for the setTimeout used by the timer

Static Method Summary
| `callOnce(?Function listener, number= opt_delay, ?Object= opt_handler) ⇒ number` Calls the given function once, after the optional pause. The function is always called asynchronously, even if the delay is 0. This is a common trick to schedule a function to run after a batch of browser event processing.
| `clear(?number timerId)` Clears a timeout initiated by callOnce