Travis build: 2161

This commit is contained in:
30secondsofcode
2018-06-18 18:26:52 +00:00
parent 5d79b0a165
commit 3197d6ddce
13 changed files with 40 additions and 31 deletions

View File

@ -11,7 +11,7 @@ Omit the second argument, `iterations`, to use the default of 100 iterations.
const hz = (fn, iterations = 100) => {
const before = performance.now();
for (let i = 0; i < iterations; i++) fn();
return 1000 * iterations / (performance.now() - before);
return (1000 * iterations) / (performance.now() - before);
};
```