# precise-timer

> A precise timer - for Node.js

Latest version **1.0.1** (published 2017-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install precise-timer
pnpm add precise-timer
yarn add precise-timer
bun add precise-timer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-08-21 |
| First published | 2017-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Frank |
| Maintainers | ironboy |

## Links

- npm: https://www.npmjs.com/package/precise-timer
- Repository: https://github.com/ironboy/precise-timer
- Homepage: https://github.com/ironboy/precise-timer#readme
- Issues: https://github.com/ironboy/precise-timer/issues
- npm.io page: https://npm.io/package/precise-timer

## Recent versions

- 1.0.1 (latest) — 2017-08-21
- 1.0.0 — 2017-08-19

## README

# precise-timer
A precise timer for Node.js. Delivers its result in milliseconds with decimals. Default is 2 decimals, but you can use up to 6 decimals - to get down to nanosecond precision.

## Usage

**npm install precise-timer**

### Example

```javascript
PreciseTimer = require('precise-timer');

// decimals is optional, defaults to 2
let timer = new PreciseTimer({decimals:6});
let randomNumberArray = [];

// a loop that is time consuming
while(randomNumberArray.length < 100000){
  randomNumberArray.push(Math.random());
}

// log how long time that has elapsed
console.log(timer.elapsed);
```

---
_Source: https://npm.io/package/precise-timer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
