# Simple delay

**URL:** <https://forum.kirupa.com/t/simple-delay/141655>\
**Category:** Uncategorized\
**Created:** [March 22, 2005, 3:38am UTC](https://forum.kirupa.com/t/simple-delay/141655 "2005-03-22T03:38:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![parad0xl0g](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@parad0xl0g](https://forum.kirupa.com/u/parad0xl0g)\
**Post date:** [March 22, 2005, 3:38am UTC](https://forum.kirupa.com/t/simple-delay/141655/1 "2005-03-22T03:38:31Z")

</div>

Hello. I have a problem 😟 , I want to use setInterval to replace the bad line:

for (k=0;k\<10000;k++){}

I looked for an example or something which could help me, but I don’t understand how to use setInterval and clearInterval. Thanks for any idea
