2026-05-31 13:54:31 +02:00

11 lines
251 B
JavaScript

export default function timeSpan() {
const start = performance.now();
const end = () => performance.now() - start;
end.rounded = () => Math.round(end());
end.seconds = () => end() / 1000;
end.nanoseconds = () => end() * 1000000;
return end;
}