Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SubscriptionLoggable.js 619B

12345678910111213141516
  1. import { SubscriptionLog } from './SubscriptionLog';
  2. export class SubscriptionLoggable {
  3. constructor() {
  4. this.subscriptions = [];
  5. }
  6. logSubscribedFrame() {
  7. this.subscriptions.push(new SubscriptionLog(this.scheduler.now()));
  8. return this.subscriptions.length - 1;
  9. }
  10. logUnsubscribedFrame(index) {
  11. const subscriptionLogs = this.subscriptions;
  12. const oldSubscriptionLog = subscriptionLogs[index];
  13. subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now());
  14. }
  15. }
  16. //# sourceMappingURL=SubscriptionLoggable.js.map