1.0.0 • Published 5 years ago
@piuccio/time-fn v1.0.0
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
1.0.0
5 years ago