# nano-time

> Current Time in Nanoseconds

Latest version **1.0.0** (published 2016-10-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install nano-time
pnpm add nano-time
yarn add nano-time
bun add nano-time
```

## 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.0 |
| Published | 2016-10-17 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Kevin Smithson |
| Maintainers | ksmithson |
| Keywords | nanoseconds, time, date, current, time, microseconds |

## Links

- npm: https://www.npmjs.com/package/nano-time
- Repository: https://github.com/sazze/node-nanotime
- Homepage: https://github.com/sazze/node-nanotime#readme
- Issues: https://github.com/sazze/node-nanotime/issues
- npm.io page: https://npm.io/package/nano-time

## Dependencies (1)

- [big-integer](https://npm.io/package/big-integer.md) ^1.6.16

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-10-17

## README

# NanoTime

Gets the current time in nanoseconds or microseconds.

In node.js you can get high resolution time with `process.hrtime()`, but it is from an unknown relative time, not epoch. So this library helps that by calculating the difference and adding it to the current time.

## Usage

Since javascript can't hold a nanosecond as an INT safely (_Number.MAX_SAFE_INTEGER_), we return a string instead.

```js
const now = require('nano-time');

now(); // '1476742925219947761' (returns a string)
now.micro(); // '1476742921398373'
now.microseconds(); // alias for now.micro();
```

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