I have a loop in a program that I want to slow down. i mean litterally slow down the operation of the code so that it stops for a length of time before executing the next step.
all the info I find pertains to settin timers (setTimeout) but all this actually does is delay the whole process. (I have a loop and i want it to loop slower. setting a timer just creates a load of defferred statements)
I was thinking about setting a flag with the timer called function resettign it but had problem with it thinking the variable was local and not the same one.
any ideas?
all the info I find pertains to settin timers (setTimeout) but all this actually does is delay the whole process. (I have a loop and i want it to loop slower. setting a timer just creates a load of defferred statements)
I was thinking about setting a flag with the timer called function resettign it but had problem with it thinking the variable was local and not the same one.
any ideas?