console.time([label])
启动可用于计算操作持续时间的定时器。定时器由唯一的 label
标识。调用 console.timeEnd()
时使用相同的 label
停止定时器并将经过的时间以合适的时间单位输出到 stdout
。例如,如果经过时间为 3869ms,则 console.timeEnd()
显示 "3.869s"。
¥Starts a timer that can be used to compute the duration of an operation. Timers
are identified by a unique label
. Use the same label
when calling
console.timeEnd()
to stop the timer and output the elapsed time in
suitable time units to stdout
. For example, if the elapsed
time is 3869ms, console.timeEnd()
displays "3.869s".