Ionic 4 - setInterval inactive tabs

Hi,

I just started studying ionic, and made a simple countdown timer using setInterval.

I got i working, but when i move to a different chrome tab, the timer seem to have stopped.

And when i go back to by app tab, it just continues to countdown the value before the switching the tab.

Lets say, i have 60 sec countdown, then let i countdown up to 40, then switch to another chrome tab.

then waited for around 10sec. I expected the value to be 30. But timer will continue the countdown at 40.