12 lines
261 B
JavaScript
12 lines
261 B
JavaScript
class ExtendedClock extends Clock {
|
|
constructor(options) {
|
|
super(options);
|
|
let { precision=1000 } = options;
|
|
this.precision = precision;
|
|
}
|
|
|
|
start() {
|
|
this.render();
|
|
this.timer = setInterval(() => this.render(), this.precision);
|
|
}
|
|
};
|