import { Clock, TimeUnit } from "../util/TimeUtil"; import { Metric } from "./Metric"; import { MetricRegistry } from "./MetricRegistry"; export interface Timer extends Metric { count(): number; totalTime(unit: TimeUnit): number; max(unit: TimeUnit): number; mean(unit: TimeUnit): number; record(amount: number, unit: TimeUnit): void; } export declare class TimerBuilder { private name; private _tags; constructor(name: string); tags(tags: { [key: string]: string; }): TimerBuilder; tag(key: string, value: string): this; register(registry: MetricRegistry): Timer; } export declare class TimerSample { private startTime; private _clock; private static defaultClock; constructor(clock: Clock); static start(clock?: Clock): TimerSample; stop(timer: Timer): void; } export declare function isTimerMetric(metric: Metric): metric is Timer;