Scheduler.js 453 B

123456789101112
  1. import { dateTimestampProvider } from './scheduler/dateTimestampProvider';
  2. export class Scheduler {
  3. constructor(schedulerActionCtor, now = Scheduler.now) {
  4. this.schedulerActionCtor = schedulerActionCtor;
  5. this.now = now;
  6. }
  7. schedule(work, delay = 0, state) {
  8. return new this.schedulerActionCtor(this, work).schedule(state, delay);
  9. }
  10. }
  11. Scheduler.now = dateTimestampProvider.now;
  12. //# sourceMappingURL=Scheduler.js.map