14 lines
No EOL
344 B
JavaScript
14 lines
No EOL
344 B
JavaScript
function ExtendedClock(options) {
|
|
Clock.apply(this, arguments);
|
|
this._precision = +options.precision || 1000;
|
|
}
|
|
|
|
ExtendedClock.prototype = Object.create(Clock.prototype);
|
|
|
|
ExtendedClock.prototype.start = function() {
|
|
this._render();
|
|
var self = this;
|
|
this._timer = setInterval(function() {
|
|
self._render();
|
|
}, this._precision);
|
|
}; |