This commit is contained in:
Angelos Chalaris
2017-12-27 11:02:46 +02:00
parent 37bb271221
commit 3d79413392
45 changed files with 89 additions and 91 deletions

View File

@ -6,8 +6,8 @@ Use `console.time()` and `console.timeEnd()` to measure the difference between t
```js
const timeTaken = callback => {
console.time('timeTaken'); const r = callback();
console.timeEnd('timeTaken'); return r;
console.time('timeTaken'); const r = callback();
console.timeEnd('timeTaken'); return r;
};
// timeTaken(() => Math.pow(2, 10)) -> 1024
// (logged): timeTaken: 0.02099609375ms