/** * Simple performance timing utilities for the protocol library. * Standalone — no external dependencies. */ type TimingCallback = (name: string, durationMs: number) => void; type TimingWrapper = (name: string, fn: () => Promise) => Promise; /** Set a global callback for timing events (e.g. for aggregation/logging). */ export declare function setTimingCallback(cb: TimingCallback | undefined): void; /** * Set a global wrapper around timed operations. * Host applications can use this to attach protocol timings to their tracing backend * without coupling the protocol package to any observability vendor. */ export declare function setTimingWrapper(wrapper: TimingWrapper | undefined): void; /** * Wraps an async function with timing measurement. * Reports duration to the global timing callback if set. */ export declare function timed(name: string, fn: () => Promise): Promise; /** * Method decorator that wraps an async method with timing measurement. * Uses `ClassName.methodName` as the timing label. */ export declare function Timed(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; export {};