/** * Timestamp normalization + duration math. Pure and total — never throws, * never does I/O. All internal math is bigint ns (ADR D2 of the plan): no * float precision loss on unix-ns timestamps. */ import type { SpanStatus, TraceSpan } from "./types.js"; /** * Normalize a timestamp to unix ns. Accepts bigint ns, a numeric string * (treated as ns), or an ISO-8601 string (ms precision → ns). Returns null * for anything unparseable — callers treat null as "cannot place this span". */ export declare function toNs(value: bigint | string | null | undefined): bigint | null; /** Span duration in ms; null when unavailable or clock-skewed (end < start). */ export declare function durationMs(span: Pick): number | null; /** Whether a span status counts as an error. Total: unknown statuses are not errors. */ export declare function isSpanError(status: SpanStatus | string | undefined): boolean; /** Compact ms/s/min duration label (`1500 → "1.5s"`). Null → "in-flight". Pure, no locale. */ export declare function formatDurationMs(ms: number | null): string;