time-marker
v0.9.0
Published
## Install
Downloads
2
Readme
time-marker
Install
npm install time-marker
// or
yarn add time-marker
Usage
tl;dr
import TimeMarker from "time-marker"
// or
const TimeMarker = require("time-marker").default
const timeMarker = new TimeMarker()
const marker = timeMarker.start('doSomething')
doSomething()
marker.stop()
marker.log() // '[doSomething] Total: 1.324799019s'
Multiple Markers
const timeMarker = new TimeMarker()
const marker1 = timeMarker.start('1')
marker1.stop()
const marker2 = timeMarker.start('2')
marker2.stop()
timeMarker.log()
// [1] Total: 0.000343245
// [2] Total: 0.000245667