repeat a task with a time delay
<p>I have a variable in my code say it is "status". I want to display some text in the application depending on this variable value. This has to be done with a specific time delay.</p>

<p>It's like,
check status variable value
Display some text
wait for 10 seconds
check status variable value
Display some text
wait for 15 seconds
and so on. The time delay may vary and it is set once the text is displayed.</p>

<p>I have tried Thread.sleep(time delay) and it failed. Any better way to get this done?</p>
