Class MockSleeper
java.lang.Object
com.google.api.client.testing.util.MockSleeper
- All Implemented Interfaces:
Sleeper
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intgetCount()Returns the number of timessleep(long)was called.final longvoidsleep(long millis) Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds as specified inThread.sleep(long).
-
Constructor Details
-
MockSleeper
public MockSleeper()
-
-
Method Details
-
sleep
Description copied from interface:SleeperCauses the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds as specified inThread.sleep(long).- Specified by:
sleepin 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()
-