sleep
public static final boolean sleep(int timeout,
int sleepTime,
java.util.concurrent.Callable<java.lang.Boolean> condition)
Sleeps for as long the specified condition is not true or the timeout has expired. If a sleep task
is provided with this instance it will perform the task as long as the condition is not met or the time out
has not expired. Bear in mind that the sleep method will not exit as long as the task is still running,
so don't make the sleep task do things that take very long if you want to have fast response times from
this method.
- Returns:
- True if the condition was met before the timeout expired, false if the time out expired or if an exception was thrown.