/** * Callback called before each short sleep while waiting for a wall-clock deadline. */ export type WorldTimeDeadlineTick = (remainingDurationMs: number) => void | Promise; /** * Callback used to perform one wait segment. */ export type WorldTimeDeadlineWait = (durationMs: number) => Promise; /** * Callback that can stop the deadline wait before the wall-clock deadline is reached. */ export type WorldTimeDeadlineStopCheck = () => boolean; /** * Waits until one wall-clock deadline has passed. * * The remaining time is recalculated from `Date.now()` after every poll and after every tick callback. * This makes waits elapse while the process is paused at a checkpoint or the computer is asleep. * * @private internal utility of `ptbk coder` wait handling */ export declare function waitUntilWorldTimeDeadline(options: { readonly deadlineTimeMs: number; readonly pollIntervalMs: number; readonly onTick?: WorldTimeDeadlineTick; readonly shouldStopWaiting?: WorldTimeDeadlineStopCheck; readonly waitForMilliseconds?: WorldTimeDeadlineWait; }): Promise;