@akkadu/timer

4.1.2 • Public • Published

Description

This is a module that allows multiple console.time type events to run at the same time.

Usage example

import Timer from '@akkadu/timer'
const timer = new Timer()

// here some-event is the id of the timer
const startTime = timer.time('some-event')
setTimeout(()=>{
  const {elapsedTime, endTime} = timer.timeEnd('some-event')
  console.log(`Timer started at ${startTime}, ended at ${endTime}, elapsed time is ${elapsedTime}`)
},1000)

Readme

Keywords

none

Package Sidebar

Install

npm i @akkadu/timer

Weekly Downloads

19

Version

4.1.2

License

ISC

Unpacked Size

6.54 kB

Total Files

10

Last publish

Collaborators

  • akkadu-techforce