API reference › @evolu/common › Schedule › elapsed
const elapsed: Schedule<Millis>;
Defined in: packages/common/src/Schedule.ts:452
A schedule that outputs the total elapsed time since the schedule started.
Never stops — combine with take or maxElapsed to limit. Useful for tracking how long a retry sequence has been running.
Example
// Track elapsed time alongside retries
const withTiming = intersectSchedules(exponential("100ms"), elapsed);
// Outputs: [[100, 0], [200, ~100], [400, ~300], ...]
// Stop after 30 seconds of elapsed time
const timeLimited = whileScheduleOutput((ms: Millis) => ms < 30000)(elapsed);