Skip to content Skip to sidebar Skip to footer

Mytimer Dose Not Exist In Console.timer()

I've been created a demo for RxJS scan() method but unfortunately my timer doesn't work properly and I get this error: Timer 'myTimer' does not exist console.time('myTimer'); let

Solution 1:

Once you've stopped the timer with console.timeEnd("name") it no longer exists when using chrome.

console.time("myTimer");
for(var i=0;i<10000;i++){
}

console.timeEnd("myTimer"); // worksconsole.timeEnd("myTimer"); // displays an error (in chrome only)

Which is pretty much what your code is doing. The first time subscribe is called your timer outputs the amount of time since it ws started. On the 3 subsequent calls it does not work.

This behaviour is specific to Chrome, it works how you expect in both IE & Firefox.

Post a Comment for "Mytimer Dose Not Exist In Console.timer()"