timer.js
A timer class to which other classes and objects can listen on. This is only an abstraction above setInterval.

File Location

timer/timer.js

Classes

goog.Timer
Class for handling timing events.

Public Protected Private

Global Functions

goog.Timer.callOnce(listeneropt_intervalopt_handler)
Calls the given function once, after the optional pause
Arguments:
listener :
Function or object that has a handleEvent method.
opt_interval :
Number of ms between ticks (Default: 1ms).
opt_handler :
Object in whose scope to call the listener.
Returns:   A handle to the timer ID.
code »
goog.Timer.clear(timerId)
Clears a timeout initiated by callOnce
Arguments:
timerId :
a timer ID.
code »

Global Properties

goog.Timer.MAX_TIMEOUT_ :
Maximum timeout value. Timeout values too big to fit into a signed 32-bit integer may cause overflow in FF, Safari, and Chrome, resulting in the timeout being scheduled immediately. It makes more sense simply not to schedule these timeouts, since 24.8 days is beyond a reasonable expectation for the browser to stay open.
Code »
goog.Timer.TICK :
Constant for the timer's event type
Code »
goog.Timer.intervalScale :
A variable that controls the timer error correction. If the timer is called before the requested interval times intervalScale, which often happens on mozilla, the timer is rescheduled. See also this.last_
Code »

Directory timer

File Reference