Skip to content

mashu-daishi/timer-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Timer class to help with debugging long functions

Usage

const TimerLite = require( 'timer-lite' );

let debugTimer = new TimerLite();

debugTimer.startTime // outputs, in epoch time, when the timer started

debugTimer.events;
//=> []

debugTimer.addEvent( 'title' );
debugTimer.addEvent( 'another title', { 'whatever' : 'you would like' } );
debugTimer.events;
//=> [ { 'title' : 'title' }, { 'title' : 'another title', 'optionalData' : { 'whatever' : 'you would like' } } ]

debugTimer.showEvents() // Will output the events, and the time between the event and the previous event.

License

MIT © Matthew Young

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published