what to substitute for thread.sleep
<p>I have a for loop as part of a background thread in my code.  Part way through execution of the code within the loop I want a wait period so I call thread.sleep.  I've discovered that if the phone display closes during the wait period the wait time becomes erratic.   According to the documentation sleep is not time reliable.  So I am wondering what to substitute.  As far as I can see if I create a post delayed sub thread I will loose the continuity within the for loop.  I hope I am wrong and have'nt understood the mechanics properly - any help appreciated.
Ron   </p>
