public interface Sleeper
Thread.sleep(long) .
The default implementation can be accessed at DEFAULT. Primarily used for testing.
| Modifier and Type | Field and Description |
|---|---|
static Sleeper |
DEFAULT
Provides the default implementation based on
Thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
sleep(long millis)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds as specified in
Thread.
|
static final SleeperDEFAULT
Thread.sleep(long) .
void sleep(long millis)
throws InterruptedException
Thread.sleep(long) .
millis - length of time to sleep in milliseconds
InterruptedException - if any thread has interrupted the current thread