UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

21 lines (16 loc) 417 B
'use strict'; /*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/timeSpanBr.ts function timeSpanBr() { const start = performance.now(); const end = () => performance.now() - start; end.rounded = () => Math.round(end()); end.seconds = () => end() / 1e3; end.nanoseconds = () => end() * 1e6; return end; } exports.timeSpanBr = timeSpanBr;