@observertc/observer-js
Version:
Server Side NodeJS Library for processing ObserveRTC Samples
18 lines (17 loc) • 545 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OnIntervalUpdater = void 0;
class OnIntervalUpdater {
_update;
name = 'OnIntervalUpdater';
description = 'Call the update() method given in the constructor once the interval elapsed';
timer;
constructor(intervalInMs, _update) {
this._update = _update;
this.timer = setInterval(() => this._update(), intervalInMs);
}
close() {
clearInterval(this.timer);
}
}
exports.OnIntervalUpdater = OnIntervalUpdater;