right-now

WebJar for right-now

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

right-now
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

right-now
WebJar for right-now
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/hughsk/right-now

Download right-now

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

right-now stable

Get the quickest, most high-resolution timestamp possible in node or the browser.

Instead of returning the date, right-now may use performance.now, Date.now, +new Date or process.hrtime to get a timestamp suitable for measuring intervals of time. Handy for both animation loops and precision benchmarking.

It's pretty small but saves me writing this boilerplate every time :)

Installation

npm install right-now

Usage

require('right-now')()

Returns a timestamp. In node, this uses process.hrtime. In the browser, support for the following is checked in this order:

  • performance.now()
  • Date.now()
  • +new Date

Versions

Version
1.0.0