aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/console/timeend/index.html
blob: 57a38b8079365f0006c4e311dd8a7b28df4612ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Console.timeEnd()
slug: Web/API/Console/timeEnd
translation_of: Web/API/Console/timeEnd
---
<div>{{APIRef("Console API")}}{{Non-standard_header}}</div>

<h2 id="概述">概述</h2>

<p>停止一个通过 <code>console.time()</code> 启动的计时器</p>

<div class="note">
<p>注意:该方法在使用时不会将输出的时间返回到js,它只能用于控制台调试.请勿将该方法作为普通计时器或性能数据收集器的一部分.</p>
</div>

<p>有关详细信息和示例,请参阅 <a href="/en-US/docs/Web/API/console#Timers">Timers</a></p>

<p>{{AvailableInWorkers}}</p>

<h2 id="语法">语法</h2>

<pre class="syntaxbox notranslate">console.timeEnd(<em>label</em>);
</pre>

<h3 id="参数">参数</h3>

<dl>
 <dt><code>label</code></dt>
 <dd>需要停止的计时器名字。一旦停止,计时器所经过的时间会被自动输出到控制台。</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("Console API", "#consoletimeendlabel", "console.timeEnd()")}}</td>
   <td>{{Spec2("Console API")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<div>{{Compat("api.Console.timeEnd")}}</div>

<div id="compat-mobile"></div>

<h2 id="相关链接">相关链接</h2>

<ul>
 <li><a href="http://www.opera.com/dragonfly/documentation/console/">Opera Dragonfly documentation: Console</a></li>
</ul>