77
78
evaluate(clock: VirtualClock, executedTotal: number, makeOverflow: () => Error): RunStatus {
79
>
const local = executedTotal - this.executedAtStart;
processor.ts
80
>
if (local >= this.maxEvents && clock.hasEvents) {
81
return { error: makeOverflow() };
82
}
84
>
const u = this.options.until;
85
>
switch (u.kind) {
86
>
case 'idle':
87
return clock.hasEvents ? 'continue' : 'done';
89
return u.token.isCancellationRequested && !clock.hasEvents ? 'done' : 'continue';
91
// Done iff every remaining event is strictly past the deadline.
92
// The sentinel guarantees the queue is non-empty until at