import { Milliseconds } from '@epdoc/timeutil'; export type Microseconds = number; /** * Represents the elapsed time since the start of the program with total and * delta properties, where delta is the time since the last call to elapsedTime. */ export type AppTimerValues = { total: Milliseconds; interval: Milliseconds; }; export type AppTimerStrings = { total: string; interval: string; }; /** * Measures elapsed time with total and interval properties. Measures in * microseconds. */ export declare class AppTimer { protected _startTime: Microseconds; protected _lastMeasurement: Microseconds; constructor(); protected now(): Microseconds; /** * Resets both the start time and last measurement to the current time. * @returns {this} The current instance for method chaining. */ resetAll(): this; /** * Resets only the last measurement to the current time. * @returns {this} The current instance for method chaining. */ resetInterval(): this; /** * Measures the elapsed time since the start and last measurement. * @returns {AppTimerValues} An object containing total and interval elapsed times in milliseconds. */ measure(): AppTimerValues; /** * Measures the elapsed time and returns it as formatted strings. * @returns {AppTimerStrings} An object containing formatted total and interval elapsed times. */ measureFormatted(): AppTimerStrings; } /** * Measures elapsed time with total and interval properties. Measures in * microseconds. Initialized at construction. */ export declare const appTimer: AppTimer;