nano-time

WebJar for nano-time

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

nano-time
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

nano-time
WebJar for nano-time
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sazze/node-nanotime

Download nano-time

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/nano-time/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>nano-time</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/nano-time/
implementation 'org.webjars.npm:nano-time:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/nano-time/
implementation ("org.webjars.npm:nano-time:1.0.0")
'org.webjars.npm:nano-time:jar:1.0.0'
<dependency org="org.webjars.npm" name="nano-time" rev="1.0.0">
  <artifact name="nano-time" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='nano-time', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "nano-time" % "1.0.0"
[org.webjars.npm/nano-time "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : big-integer jar [1.6.16,2)

Project Modules

There are no modules declared in this project.

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.

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

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

Sazze, Inc.

Versions

Version
1.0.0