export type Instant = string | number; export interface Period { startAt: Instant; endAt?: Instant | null; } /** Is the period running at that instant. */ export declare function periodOpenAt(period: Period, at: number): boolean; /** Do the period and the window share any time. */ export declare function periodOverlaps(period: Period, window: { startAt: number; endAt: number; }): boolean; /** * **How much of the period falls in the window**, in ms. A period still running counts up to `until` (now) - time that * has not come is not counted as used. */ export declare function clipMs(period: Period, window: { startAt: number; endAt: number; }, until: number): number; /** A share, or nothing - an empty whole is not a zero (nothing was measured). Rounded to `places`. */ export declare function ratioOrMissing(part: number, whole: number, places?: number): number | null;