public class Wait extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Wait.StopCondition
Wait-stop condition.
|
| Modifier and Type | Field and Description |
|---|---|
static Wait |
defaultInterval
Wait instance with 200ms interval.
|
| Constructor and Description |
|---|
Wait(long interval)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
sleep(long millis)
Sleep without checked exception.
|
boolean |
wait(long startTime,
long timeout,
Wait.StopCondition stopCondition)
Wait until the wait-stop condition returns true or time runs out.
|
public static final Wait defaultInterval
public Wait(long interval)
interval - interval time (ms).public static void sleep(long millis)
throws RuntimeException
millis - the length of time to sleep in milliseconds.RuntimeException - wrap InterruptedException.public boolean wait(long startTime,
long timeout,
Wait.StopCondition stopCondition)
startTime - start time.timeout - timeout (ms). (>= 0)stopCondition - wait-stop condition.Copyright © 2016. All rights reserved.