import { type Duration, type DurationUnit } from '@date-vir/duration'; /** * Measures how long (in milliseconds) the given callback takes to run to completion. By default * this is synchronous, but it will automatically switch to async and await the callback if it * returns a promise. * * @category Function * @category Package : @augment-vir/common * @example * * ```ts * import {measureExecutionDuration} from '@augment-vir/common'; * * const duration1 = measureExecutionDuration(() => {}); * const duration2 = await measureExecutionDuration(async () => {}); * ``` * * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function measureExecutionDuration(callback: () => T): T extends Promise ? Promise> : Duration;