console.timeLog

September 11, 2019

Logs the current value of a timer that was previously started by calling console.time

https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog

I always had trouble coming up with unique labels when logging inside loops because I didn't know this existed and relied on console.time and console.timeEnd.

Example

console.time('test'); setInterval(() => { console.timeLog('test'); }, 500);

Logs something like:

test: 500.716064453125 ms test: 1000.72509765625 ms test: 1500.756103515625 ms test: 2000.7880859375 ms #...

https://jsfiddle.net/robindrexler/9vyb3c5f/1/