Scheduler.js 629 B

12345678910111213141516
  1. import { dateTimestampProvider } from './scheduler/dateTimestampProvider';
  2. var Scheduler = (function () {
  3. function Scheduler(schedulerActionCtor, now) {
  4. if (now === void 0) { now = Scheduler.now; }
  5. this.schedulerActionCtor = schedulerActionCtor;
  6. this.now = now;
  7. }
  8. Scheduler.prototype.schedule = function (work, delay, state) {
  9. if (delay === void 0) { delay = 0; }
  10. return new this.schedulerActionCtor(this, work).schedule(state, delay);
  11. };
  12. Scheduler.now = dateTimestampProvider.now;
  13. return Scheduler;
  14. }());
  15. export { Scheduler };
  16. //# sourceMappingURL=Scheduler.js.map