How do I manipulate the speed of a for loop?
How do I manipulate the speed of a for loop?
Or place a call to Sleep() in the body.
umm......an example would be nice. I never dreamed of placing a loop inside of a Sleep(); function. Thats un-heard of
Um... Not a loop in a Sleep() function, but the other way around.
for (int a=0; a<10; a++)
{
Dosomething();
Sleep(1); // I don't quite know the syntax of sleep, this could be wrong.
}
But I don't think you could find much use for a slowed down for-loop (unless you're fading the screen to black or something)
Sleep(numofmiliseconds);
Are you trying to find out the speed of a for loop? That depends on the code in the loop.
yeah!! thats it
D/l this header, it reads time at a certain line, then can tell you how long it took after the loop is finished.
ok, I downloaded it