This commit is contained in:
Ilya Kantor 2019-03-07 10:35:58 +03:00
parent 16cfa3037b
commit cdc1693443
7 changed files with 43 additions and 63 deletions

View file

@ -2,11 +2,11 @@ class ExtendedClock extends Clock {
constructor(options) {
super(options);
let { precision=1000 } = options;
this._precision = precision;
this.precision = precision;
}
start() {
this._render();
this._timer = setInterval(() => this._render(), this._precision);
this.render();
this.timer = setInterval(() => this.render(), this.precision);
}
};