Class MockSleeper (1.41.8)

public class MockSleeper implements Sleeper

Beta
Mock for Sleeper.

Implementation is not thread-safe.

Inheritance

java.lang.Object > MockSleeper

Implements

Sleeper

Constructors

MockSleeper()

public MockSleeper()

Methods

getCount()

public final int getCount()

Returns the number of times #sleep(long) was called.

Returns
TypeDescription
int

getLastMillis()

public final long getLastMillis()

Returns the value of millis parameter when #sleep(long) was last called or 0 if not called.

Returns
TypeDescription
long

sleep(long millis)

public 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).

Parameter
NameDescription
millislong
Exceptions
TypeDescription
InterruptedException