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.sleep(long) . |
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.sleep(long) . |
static final Sleeper DEFAULT
Thread.sleep(long)
.void sleep(long millis) throws InterruptedException
Thread.sleep(long)
.millis
- length of time to sleep in millisecondsInterruptedException
- if any thread has interrupted the current threadCopyright © 2011–2019 Google. All rights reserved.