This page was translated from English by the community. Learn more and join the MDN Web Docs community.
console.timeEnd()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
console.timeEnd() 는 이전에 console.time()를 호출하여 시작된 타이머를 중지합니다.
자세한 내용과 예제는 타이머를 참조하세요.
참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.
구문
js
console.timeEnd(label);
매개변수
예제
js
console.time("answer time");
alert("Click to continue");
console.timeLog("answer time");
alert("Do a bunch of other stuff...");
console.timeEnd("answer time");
위 예제의 출력은 사용자가 첫 번째 경고 상자를 닫는 데 걸린 시간과 사용자가 두 번째 경고를 닫는 데 걸린 시간을 보여줍니다.
타이머 이름은 timeLog()를 사용하여 타이머 값을 기록할 때 표시되고 중지될 때 다시 표시됩니다. 또한 timeEnd()에 대한 호출에는 타이머가 더 이상 시간을 추적하지 않는다는 것을 분명히 하기 위해 "타이머 종료됨"이라는 추가 정보가 있습니다.
명세
| Specification |
|---|
| Console> # timeend> |
브라우저 호환성
Enable JavaScript to view this browser compatibility table.