@piuccio/time-fn

1.0.0 • Public • Published

Measure how long it takes to call an asynchronous function

Usage

const time = require('@piuccio/time-fn');

await time(() => {
  // ... you code here
});

It'll print to stdout how long it took for the function to resolve.

Return

const time = require('@piuccio/time-fn');

const result = await time(myFunction);
// result will be the resolved value of myFunction

Readme

Keywords

none

Package Sidebar

Install

npm i @piuccio/time-fn

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.25 kB

Total Files

8

Last publish

Collaborators

  • piuccio