Starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call
console.timeEnd()
with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started.
见
计时器
在
console
documentation for details and examples.
console.time(label);
label
console.timeEnd()
to stop the timer and get the time output to the console.
| 规范 | 状态 | 注释 |
|---|---|---|
|
控制台 API
The definition of 'console.time()' in that specification. |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
time
|
Chrome 1 | Edge 12 | Firefox 10 | IE 11 | Opera 11 | Safari 4 | WebView Android 1 | Chrome Android 18 | Firefox Android 10 | Opera Android 11 | Safari iOS 3.2 | Samsung Internet Android 1.0 |
完整支持