0

In javascript, when I call setTimeout, setInterval or requestAnimationFrame, it will return an id which later can be used to cancel it.

But the id is continuously increamenting, especially when called frequently like "requestAnimationFrame". So I am wondering if the id will later be lager enough that will eventually overflowed?

3
  • yes but that would be a long time. Feb 16, 2016 at 1:50
  • 3
    At 100 frames per second, it will take around 3 million years for the id to overflow a JavaScript Number. Feb 16, 2016 at 2:05
  • Thanks, I think I'm somewhat unfounded...@Raymond
    – sangelee
    Feb 16, 2016 at 2:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.