Class MockSleeper
- java.lang.Object
-
- com.google.api.client.testing.util.MockSleeper
-
-
Constructor Summary
Constructors Constructor Description MockSleeper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCount()
Returns the number of timessleep(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 inThread.sleep(long)
.
-
-
-
Method Detail
-
sleep
public void sleep(long millis) throws InterruptedException
Description copied from interface:Sleeper
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds as specified inThread.sleep(long)
.- Specified by:
sleep
in interfaceSleeper
- Parameters:
millis
- length of time to sleep in milliseconds- Throws:
InterruptedException
- if any thread has interrupted the current thread
-
getCount
public final int getCount()
Returns the number of timessleep(long)
was called.
-
getLastMillis
public final long getLastMillis()
-
-