Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

timoi

Yet another elapse time library.

elapse, time, timer, benchmark, clock

readme

Timoi

Yet another elapse time library.

Installation

 $ npm i timoi

Usage

Log to the console or take timing date for further computation

import timoi from "timoi"

const time = timoi()
doWork()

time()      // console.log(`Took ${x}ms`)
time.time() // x
time.str()  // `${x}ms`

Named scopes

import timoi from "timoi"

const time = timoi("doWork")
doWork()

time()      // console.log(`doWork took ${x}ms`)
doWork()

time()      // console.log(`doWork#2 took ${x}ms`)

Contribute

All feedback is appreciated. Create a pull request or write an issue.