Files
backend/.pnpm-store/v10/files/00/36e183b6b42e5d6e87e70e5dcb97728a7d60d303e3b46335da7409edcce1fed393d7b3c5032bb8b24c80b05c68bb3bb07da91337644284cea98c0bfe7048ee
T
2026-03-22 13:31:39 +00:00

47 lines
650 B
Plaintext

export interface TimeEndFunction {
/**
@returns Elapsed milliseconds.
*/
(): number;
/**
@returns Elapsed milliseconds rounded.
*/
rounded(): number;
/**
@returns Elapsed seconds.
*/
seconds(): number;
/**
@returns Elapsed nanoseconds.
*/
nanoseconds(): bigint;
}
/**
Simplified high resolution timing.
@returns A function that returns the time difference.
@example
```
import timeSpan from 'time-span';
const end = timeSpan();
timeConsumingFn();
console.log(end());
//=> 1745.3186
console.log(end.rounded());
//=> 1745
console.log(end.seconds());
//=> 1.7453186
```
*/
export default function timeSpan(): TimeEndFunction;