public class Timeout
extends java.lang.Object
Constructor and Description |
---|
Timeout(long value)
Creates a new timeout instance.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
long |
getValue()
Returns current timeout value.
|
boolean |
isExceeded()
Checks if the timeout is occured.
|
long |
remainedTime()
Returns timeout remain time.
|
void |
waitUntilExceeded()
Suspends the current calling thread until the timeout exceeded.
|
static void |
waitUntilExceeded(long value) |
public Timeout(long value)
value
- the timeout value in millisecondspublic static void waitUntilExceeded(long value)
public long getValue()
public long remainedTime()
public boolean isExceeded()
true
if the current timeout is occuredpublic void cancel()
public void waitUntilExceeded()
Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved