Class MockSleeper
java.lang.Object
com.google.api.client.testing.util.MockSleeper
- All Implemented Interfaces:
Sleeper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intNumber of timessleep(long)was called.private long -
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).
-
Field Details
-
count
private int countNumber of timessleep(long)was called. -
lastMillis
private long lastMillis
-
-
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()
-