Software Archive
Read-only legacy content
17061 Discussions

clearInterval()

Joubert__Lew
Beginner
545 Views

Hopefully someone can point me in the right direction :-)

I have two machines, machine 1 OS = Windows 10, machine 2 OS = Debian

setInterval() / clearInterval() works fine on the Windows 10 machine.

On Debian setInterval() works, but clearInterval() does not stop the timer.

Same code used on both machines.

Any suggestions appreciated.

 

 

0 Kudos
2 Replies
Chris_P_Intel
Employee
545 Views

Are you sure the timer_id you are passing to clearInterval() is the one you got from setInterval()?

My guess is that your code is making a mistake and isn't passing the right timer id.  Or, maybe you are calling setInterval() more than once? 

 

 

0 Kudos
Joubert__Lew
Beginner
545 Views

Thanks for the response Chris - I've checked and double checked, believe me, definately the correct variable, and calling setInterval() only once - as mentioned the identical code works fine under Windows 10.

0 Kudos
Reply