TenantAtlas/apps/platform/.pnpm-store/v10/files/02/0e4c15fe6701d128cd48ca89e6ab4bfcbd163b257111dcb3fa172124c6cb42992e74d5395388c6c078aaad6cfd8d49947c9285cbb96fab4ba0621fecb79cbd
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

23 lines
711 B
Plaintext

import { Scheduler } from '../Scheduler';
import { SubscriptionLog } from './SubscriptionLog';
export class SubscriptionLoggable {
public subscriptions: SubscriptionLog[] = [];
// @ts-ignore: Property has no initializer and is not definitely assigned
scheduler: Scheduler;
logSubscribedFrame(): number {
this.subscriptions.push(new SubscriptionLog(this.scheduler.now()));
return this.subscriptions.length - 1;
}
logUnsubscribedFrame(index: number) {
const subscriptionLogs = this.subscriptions;
const oldSubscriptionLog = subscriptionLogs[index];
subscriptionLogs[index] = new SubscriptionLog(
oldSubscriptionLog.subscribedFrame,
this.scheduler.now()
);
}
}