JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 559
  • Score
    100M100P100Q105394F
  • License BSD-3-Clause

Precision timer for nanosecond differences

Package Exports

  • precise
  • precise/dist/precise.cjs
  • precise/dist/precise.esm.js

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 (precise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

precise

Nanosecond timer for node.js

API

start()

Starts a timer

stop()

Stops a timer

diff(ms = false)

Returns the time delta between start() & stop(); setting optional parameter to true will return the delta as milliseconds

Example

import {precise} from "precise";
const timer = precise().start();
setTimeout(() => console.log(timer.stop().diff()), 1000);

License

Copyright (c) 2022 Jason Mulligan Licensed under the BSD-3 license