@piuccio/time-fn
v1.0.0
Published
Measure how long it takes to call an asynchronous function
Downloads
1
Readme
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