Scheduler.js 768 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Scheduler = void 0;
  4. var dateTimestampProvider_1 = require("./scheduler/dateTimestampProvider");
  5. var Scheduler = (function () {
  6. function Scheduler(schedulerActionCtor, now) {
  7. if (now === void 0) { now = Scheduler.now; }
  8. this.schedulerActionCtor = schedulerActionCtor;
  9. this.now = now;
  10. }
  11. Scheduler.prototype.schedule = function (work, delay, state) {
  12. if (delay === void 0) { delay = 0; }
  13. return new this.schedulerActionCtor(this, work).schedule(state, delay);
  14. };
  15. Scheduler.now = dateTimestampProvider_1.dateTimestampProvider.now;
  16. return Scheduler;
  17. }());
  18. exports.Scheduler = Scheduler;
  19. //# sourceMappingURL=Scheduler.js.map