/** * Human-readable durations and sizes, shared by tool output and (later) the * panel, so both say the same thing about the same task. * * @author mystery4f <40482524+mystery4f@users.noreply.github.com> */ /** * How long a record has been alive: to its end when it has one, to now while it * runs. One formula, because a row, a tool line and a notification all quote the * same task and must not disagree about it. */ export declare function elapsedOf(task: { createdAt: number; endedAt?: number; }, now: number): number; /** `0.4s`, `12.3s`, `2m 05s`, `1h 03m`. */ export declare function formatDuration(milliseconds: number): string; /** `512 B`, `1.5 KiB`, `20.0 MiB`. */ export declare function formatBytes(bytes: number): string; /** * The first line of a command, cut to a preview length. A record read without * `full` shows this; reading with `full` shows the command as it was given. */ export declare function commandPreview(command: string, maxLength?: number): string; /** A wall-clock time as the panel shows it: `09:30:05`, local time. */ export declare function formatClockTime(at: number): string; /** * How a fire's number is written: `#3` for a scheduled fire, `m1` for the first * fire started by hand. The negative numbers the store keeps are an encoding, not * something a reader should have to decode (ADR-0018). */ export declare function fireLabel(fire: number): string;