1.2.1 • Published 8 years ago
times-js v1.2.1
Times-js
Times-js was created to measure how long it takes for a function to complete.
See this package on NPM.
Installing
To install Times-js enter the command:
npm install times-js --save
Usage
const times = require('times-js');
times.howLong(() => {
console.log("This is the function being measured.");
});
To run a function with parameters, try this:
const times = require('times-js');
// Just a little add function...
let add = (a, b) => {
console.log(a + " + "+ b +" = " + (a + b));
};
times.howLong(add, 1, 2);