clock
This commit is contained in:
parent
16cfa3037b
commit
cdc1693443
7 changed files with 43 additions and 63 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue