export type Interval = { start: number; end: number; }; /** `base` minus the UNION of `pieces` (pieces are clamped into `base` * first, so a malformed log can never produce a negative residue). * Powers self-time: a span's envelope minus its children's envelopes. */ export declare function subtract(base: Interval, pieces: Interval[]): Interval[]; /** Fraction of each of `cells` equal slices of `window` that `intervals` * occupy, each in [0, 1]. Overlapping intervals clamp at 1 — shade means * busyness, never overlap count. A zero-width window degenerates to 1ms * so the math stays finite (the drill-into-a-0ms-span case). */ export declare function coverage(intervals: Interval[], window: Interval, cells: number): number[]; /** How much of a cell is occupied and where: `mid` is the midpoint of the * occupied part as a fraction of the cell, 0.5 when nothing is, so a bar * can draw a span that starts late in a cell on that cell's right side. */ export type CellFill = { fraction: number; mid: number; }; export declare function cellFills(intervals: Interval[], window: Interval, cells: number): CellFill[]; export declare function totalMs(intervals: Interval[]): number;