|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.terrier.utility.TerrierTimer
public class TerrierTimer
This class implements a timer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected double |
done
Number of items in task completed |
protected short |
lastPercentage
the last percentage that was output. |
protected String |
message
the message that should be output with the progress |
protected long |
startingTime
The starting system time in millisecond. |
protected double |
total
The total number of items to process in a task. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TerrierTimer()
|
|
TerrierTimer(String message,
double total)
|
Method Summary | |
---|---|
String |
elapsed()
Get a string summarising the processing/remaining time in minutes and seconds. |
void |
finished()
|
short |
getPercentage()
|
String |
getRemainingTime()
|
void |
increment()
|
void |
increment(double dIncrememt)
|
static String |
longToText(long timems)
|
void |
run()
|
void |
setDone(double done)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final long startingTime
protected final double total
protected volatile double done
protected short lastPercentage
protected final String message
Constructor Detail |
---|
public TerrierTimer()
public TerrierTimer(String message, double total)
Method Detail |
---|
public void setDone(double done)
public short getPercentage()
public void run()
run
in interface Runnable
run
in class Thread
public void increment()
public void increment(double dIncrememt)
public void finished()
public String getRemainingTime()
public String elapsed()
public static String longToText(long timems)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |