--- title: Console.time() slug: Web/API/Console/time tags: - API - DOM - Debugging - Method - Web Development - console - web console - メソッド translation_of: Web/API/Console/time --- <div>{{APIRef("Console API")}}</div> <p>処理時間がどれくらいかを計測するために使用することができるタイマーを開始します。各タイマーに一意の名前を付ければ、ページ内に10,000個までのタイマーを実行させることができます。同じ名前を引数として {{domxref("console.timeEnd()")}} を呼び出すと、タイマー開始からの経過時間がミリ秒単位で出力されます。</p> <p>詳細や使用例については、 {{domxref("console")}} のページの 『<a href="/ja/docs/Web/API/console#Timers">タイマー</a>』 を参照して下さい。</p> <p>{{AvailableInWorkers}}</p> <h2 id="Syntax" name="Syntax">構文</h2> <pre class="syntaxbox">console.time(<var>label</var>); </pre> <h2 id="Parameters" name="Parameters">引数</h2> <dl> <dt><code><var>label</var></code></dt> <dd>新しいタイマーにつける名前。各タイマーの識別に用います。同じ名前を使用して {{domxref("console.timeEnd()")}} を呼び出すと、タイマーを終了して時間をコンソールに出力します。</dd> </dl> <h2 id="Specification" name="Specification">仕様書</h2> <table class="standard-table"> <thead> <tr> <th scope="col">仕様書</th> <th scope="col">状態</th> <th scope="col">備考</th> </tr> </thead> <tbody> <tr> <td>{{SpecName("Console API", "#consoletimelabel", "console.time()")}}</td> <td>{{Spec2("Console API")}}</td> <td>初回定義</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> <p>{{Compat("api.Console.time")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>{{domxref("Console.timeEnd()")}}</li> <li>{{domxref("Console.timeLog()")}}</li> <li><a class="external" href="http://www.opera.com/dragonfly/documentation/console/">Opera Dragonfly documentation: Console</a></li> </ul>