Waits inside loops can mess the order things are executed. I think someone already mentioned that here.
In my opinion you're trying to fix something that's fundamentaly broken. Like I said before, I don't know what you're trying to do with all this engineering, but I'm certain there are better ways to do it that don't involve geting waits inside loops.
If you can share more details, we may be able to help you on that.
EDIT: And I insist. TIMERS are normally better for achieving what it seems you're trying to achieve.
Cheers!