We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88837af commit 023c4b1Copy full SHA for 023c4b1
benchmarks/timer.js
@@ -3,8 +3,12 @@ module.exports = _ => {
3
return _ => {
4
const end = process.hrtime(start)
5
const ms = Math.round(end[0]*1e6 + end[1]/1e3)/1e3
6
- const s = Math.round(end[0]*10 + end[1]/1e8)/10
7
- const ss = s <= 1 ? '' : ' (' + s + 's)'
8
- console.log('%d%s', ms, ss)
+ if (!process.env.isTTY)
+ console.log(ms)
+ else {
9
+ const s = Math.round(end[0]*10 + end[1]/1e8)/10
10
+ const ss = s <= 1 ? '' : ' (' + s + 's)'
11
+ console.log('%d%s', ms, ss)
12
+ }
13
}
14
0 commit comments