SubscriptionLoggable.js 868 B

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