Skip to content

DannyNemer/hrtimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hrtimer

A high resolution timer for Node.js with precision in milliseconds.

Installation

npm install dannynemer/hrtimer

Usage

var hrtimer = require('hrtimer')

// Start timer
hrtimer.start('my test')

// ...stuff...

hrtimer.end('my test')
// => Prints "my test: 13.264 ms"

// ...more stuff...

hrtimer.end('my test')
// => Prints "my test: 31.183 ms"

hrtimer

hrtimer

hrtimer.start(label)

#

Starts a high-resolution timer (with precision in microseconds) identified by label. Use hrtimer.end(label) to print the timer's current value.

Arguments

  1. label (string): The timer identifier.

hrtimer.end(label)

#

Prints the current high-resolution value of a timer initiated with hrtimer.start(label).

Arguments

  1. label (string): The timer identifier.

About

A high resolution timer for Node.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published