I am currently using a dummy loop as a delay in my code. I know this will not work in every computer because of processor speed differences and workload. I'd like to replace this code with a delay, but I haven't found one that delays for X milliseconds, only seconds. I need two things:
1. How do I find out how long my loop is taking to execute? (So I'll know how long my delay is in ms)
for (delayLoop = 0; delayLoop < 80000; delayLoop++)
{
dummy++;
}
2. How do I put in a delay in milliseconds? It seems like Delay, Timer, and SyncWait are all for "seconds" delays.
Thank you.