JavaScript tips — Measuring performance using console.time()

Veröffentlicht am: 13 Dezember 2022
auf dem Kanal: Code 2020
964
36

console.time lets you measure the elapsed time between any two points in your code. The elapsed time is then printed to the developer console

To start a timer, simply call console.time(). You can also pass in an optional label to identify the timer

To end a timer, just call console.timeEnd(). If you labeled the timer, you must pass in the same label here. This will then print the elapsed time for the timer to the console

The two calls do not have to be in the same scope. This makes it easy to measure the elapsed time between any two points in your code

#javascript


Auf dieser Seite können Sie das Online-Video JavaScript tips — Measuring performance using console.time() mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code 2020 13 Dezember 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 964 Mal angesehen und es wurde von 36 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!