return u.token.isCancellationRequested && !clock.hasEvents ? 'done' : 'continue';
case 'time': {
// The sentinel guarantees the queue is non-empty until at
// least the deadline is reached, so we never resolve "early"
// just because nothing has been scheduled yet.
const next = clock.peekNext();
return next === undefined || next.time > u.time ? 'done' : 'continue';
}
}
}