Class FixedTimeout
java.lang.Object
org.jmock.lib.concurrent.internal.FixedTimeout
- All Implemented Interfaces:
Timeout
A Timeout of fixed duration from the time the FixedTimeout object is
instantiated.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the time remaining, to be passed towait
or throws TimeoutException if the timeout has expired.
-
Field Details
-
duration
private final long duration -
start
private final long start
-
-
Constructor Details
-
FixedTimeout
public FixedTimeout(long duration)
-
-
Method Details
-
timeRemaining
Description copied from interface:Timeout
Returns the time remaining, to be passed towait
or throws TimeoutException if the timeout has expired.- Specified by:
timeRemaining
in interfaceTimeout
- Throws:
TimeoutException
-