|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.util.Timeout
public class Timeout
Timeout manager.
This class implements software timeout. Track time using the current system milliseconds / nanoseconds timer.
Constructor Summary | |
---|---|
Timeout()
Default constructor. |
|
Timeout(boolean nano)
Constructor with specified unit |
|
Timeout(long n)
Constructor with specified timeout in ms |
|
Timeout(long timeout,
boolean nano)
Constructor with specified timeout and unit of mesaures. |
Method Summary | |
---|---|
int |
getElapsed()
Return the number time as int. |
long |
getElapsedEx()
Return the elapsed time as long |
boolean |
isExpired()
Return true if the timer is expired. |
static void |
main(java.lang.String[] argv)
Main method for simple test |
void |
restart()
Restart the timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timeout()
public Timeout(long n)
public Timeout(boolean nano)
public Timeout(long timeout, boolean nano)
timeout
- - The specified timeoutnano
- - If true the unit of measures will be nano
seconds else milliseconds.Method Detail |
---|
public final void restart()
public final long getElapsedEx()
public final int getElapsed()
public final boolean isExpired()
public static void main(java.lang.String[] argv)
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |