JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1931250
  • Score
    100M100P100Q184726F
  • License MIT

Simplified high resolution timing

Package Exports

  • time-span

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (time-span) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

time-span Build Status

Simplified high resolution timing

Install

$ npm install time-span

Usage

const timeSpan = require('time-span');

const end = timeSpan();

timeConsumingFn();

console.log(end());
//=> 1745.3186

console.log(end.rounded());
//=> 1745

console.log(end.seconds());
//=> 1.7453186

API

const end = timeSpan()

Returns a function, that when called, returns the time difference.

end()

Elapsed milliseconds.

end.rounded()

Elapsed milliseconds rounded.

end.seconds()

Elapsed seconds.

end.nanoseconds()

Elapsed nanoseconds.

License

MIT © Sindre Sorhus