# Is setInterval reliable?

**URL:** <https://forum.kirupa.com/t/is-setinterval-reliable/172032>\
**Category:** Uncategorized\
**Created:** [December 10, 2005, 3:21am UTC](https://forum.kirupa.com/t/is-setinterval-reliable/172032 "2005-12-10T03:21:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veraxoxo](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@veraxoxo](https://forum.kirupa.com/u/veraxoxo)\
**Post date:** [December 10, 2005, 3:21am UTC](https://forum.kirupa.com/t/is-setinterval-reliable/172032/1 "2005-12-10T03:21:47Z")

</div>

I am using setInterval to call a function every 4 seconds, but when I test my code it is very sporadic - sometimes it works fine and at other times the interval increases and the function gets called too fast. Why would this happen? Why would setInterval start calling myFunction every 2 seconds when I’m asking it to do so every 4 secs?

\_root.intervalID = setInterval(myFunction, 4000);

HELP!!!
