https://github.com/lmzdev/timespan-milliseconds
timespan in sub-milliseconds
https://github.com/lmzdev/timespan-milliseconds
hrtime milliseconds nodejs npm npm-module
Last synced: 2 months ago
JSON representation
timespan in sub-milliseconds
- Host: GitHub
- URL: https://github.com/lmzdev/timespan-milliseconds
- Owner: lmzdev
- License: mit
- Created: 2022-12-19T09:29:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T16:22:04.000Z (over 2 years ago)
- Last Synced: 2025-01-30T20:42:24.965Z (4 months ago)
- Topics: hrtime, milliseconds, nodejs, npm, npm-module
- Language: JavaScript
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# timespan-milliseconds
[](https://github.com/lmzdev/timespan-milliseconds/actions/workflows/tests.yml)Pretty timespan-measurement in sub-milliseconds
## Install
```npm i timespan-milliseconds```## Import
```js
import {now, since} from 'timespan-milliseconds'const start = now()
// do something
console.log(`took ${since(start)} ms`)
// 'took 1.23 ms'
```## Require
```js
const {now, since} = require('timespan-milliseconds')const start = now()
// do something
console.log(`took ${since(start)} ms`)
// 'took 1.23 ms'
```