SubscriptionLoggable.js 797 B

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