https://blog.kovah.de/en/0a9fb-console-time-console-timeend/ You can use console.time and console.timeEnd to measure the time it takes to do stuff in JavaScript Kevin Woblick

console.time and console.timeEnd

I just read about these two functions that can be used to measure times without the need of using the Date class. And I use stuff like console.log('End: ' + (new Date.now() - start))

Example:

// Start the timer
console.time('testStuff');

// Do your stuff here

// Stop the timer
console.timeEnd('testStuff');

// Console outputs something like 648.124ms

This Blog happily accepts Webmentions

0 Mentions
0 Reposts
Likes