0

If you type the following into the chrome console

setInterval(function(){
    console.log(new Date())
},5000);

You can see that the time is stamped every 5 seconds.

But I clicked chrome minimize and after a few minutes

It can be seen that this interval is maintained for 1 minute.

Do you know why?

Fri Jan 21 2022 17:13:43 GMT+0900 (Korean Standard Time)VM274:2 
Fri Jan 21 2022 17:14:17 GMT+0900 (Korean Standard Time)VM274:2 
Fri Jan 21 2022 17:14:25 GMT+0900 (Korean Standard Time)VM274:2 
Fri Jan 21 2022 17:15:25 GMT+0900 (Korean Standard Time)VM274:2 
Alon Eitan
  • 11,914
  • 8
  • 48
  • 57
  • Related: https://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome – Emil Karlsson Jan 21 '22 at 09:43

0 Answers0