Constructor and Description |
---|
MockSleeper() |
Modifier and Type | Method and Description |
---|---|
int |
getCount()
Returns the number of times
sleep(long) was called. |
long |
getLastMillis()
|
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) . |
public void sleep(long millis) throws InterruptedException
Sleeper
Thread.sleep(long)
.sleep
in interface Sleeper
millis
- length of time to sleep in millisecondsInterruptedException
- if any thread has interrupted the current threadpublic final int getCount()
sleep(long)
was called.public final long getLastMillis()
Copyright © 2011–2022 Google. All rights reserved.