present

WebJar for present

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

present
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

present
WebJar for present
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dbkaplun/present

Download present

How to add to project

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

present present on npm build status

High-res timestamps in Node and browser

Installation

In Node: npm install present

In browser:

  1. Copy present.js or present.min.js (with optional source map at present.min.js.map)
  2. <script src="path/to/present.{min.}js"></script>
  3. performance.now is automatically polyfilled -- if this is undesired, present.noConflict();

Usage

Node only: var present = require('present');

present()

Returns a timestamp in milliseconds. In node, this uses process.hrtime. In the browser, the following are attempted (in order):

  • performance.now()
  • performance.webkitNow()
  • performance.msNow()
  • performance.mozNow()
  • performance.oNow()
  • Date.now()
  • new Date().getTime()

present.noConflict()

Browser only. Resets performance.now to what it was before present was included or present.conflict was called.

present.conflict()

Browser only. Polyfills performance.now.

Versions

Version
1.0.0
0.0.6