Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.37 KB

tpl.readme.md

File metadata and controls

56 lines (36 loc) · 1.37 KB

About

{{pkg.description}}

Note

The functions in this package have been extracted from @thi.ng/bench.

This package provides the following functions:

  • now() attempts to use high-res ES BigInt timestamps (in Node via process.hrtime.bigint()), or falls back to performance.now(), or lacking that, uses Date.now(). In all cases, returns a (possibly rounded) nanosec-scale timestamp, either as bigint or number.
  • timeDiff() function can be used to compute the difference between two such timestamp and return it as milliseconds.
  • asMillis() takes a duration (either a number or bigint) in nanosec-scale and converts it to a JS number in milliseconds

{{meta.status}}

{{repo.supportPackages}}

{{repo.relatedPackages}}

{{meta.blogPosts}}

Installation

{{pkg.install}}

{{pkg.size}}

Dependencies

{{pkg.deps}}

{{repo.examples}}

API

{{pkg.docs}}

TODO