Skip to content

A high resolution timer that returns the duration in a format thats easy for humans to understand

License

Notifications You must be signed in to change notification settings

ianwalter/timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ianwalter/timer

A high resolution timer that returns the duration in a format thats easy for humans to understand

npm page

Installation

yarn add @ianwalter/timer

Usage

const createTimer = require('@ianwalter/timer')
const timer = createTimer()
// Call stop() or duration() or both.
const milliseconds = timer.stop()
const duration = timer.duration()
// timer.time => [2, 506289527]
// milliseconds => 2506.29
// duration => 2s 506.29ms

License

Apache 2.0 with Commons Clause - See LICENSE

 

Created by Ian Walter

About

A high resolution timer that returns the duration in a format thats easy for humans to understand

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published