public interface Sleeper
Thread.sleep(long) to permit better testability.| Modifier and Type | Field and Description |
|---|---|
static Sleeper |
SYSTEM_SLEEPER |
| Modifier and Type | Method and Description |
|---|---|
void |
sleep(Duration duration)
Deprecated.
|
void |
sleep(java.time.Duration duration)
Sleeps for the specified duration of time.
|
static final Sleeper SYSTEM_SLEEPER
@Deprecated void sleep(Duration duration) throws java.lang.InterruptedException
sleep(java.time.Duration)duration - How long to sleep.java.lang.InterruptedException - If the thread is interrupted while sleeping.void sleep(java.time.Duration duration)
throws java.lang.InterruptedException
duration - How long to sleep.java.lang.InterruptedException - If the thread is interrupted while sleeping.