public static final class TimeLimitingCollector.TimerThread
extends java.lang.Thread
stopTimer()
Modifier and Type | Field and Description |
---|---|
(package private) Counter |
counter |
static int |
DEFAULT_RESOLUTION |
private long |
resolution |
private boolean |
stop |
static java.lang.String |
THREAD_NAME |
private long |
time |
Constructor and Description |
---|
TimerThread(Counter counter) |
TimerThread(long resolution,
Counter counter) |
Modifier and Type | Method and Description |
---|---|
long |
getMilliseconds()
Get the timer value in milliseconds.
|
long |
getResolution()
Return the timer resolution.
|
void |
run() |
void |
setResolution(long resolution)
Set the timer resolution.
|
void |
stopTimer()
Stops the timer thread
|
activeCount, checkAccess, clone, 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
public static final java.lang.String THREAD_NAME
public static final int DEFAULT_RESOLUTION
private volatile long time
private volatile boolean stop
private volatile long resolution
final Counter counter
public TimerThread(long resolution, Counter counter)
public TimerThread(Counter counter)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public long getMilliseconds()
public void stopTimer()
public long getResolution()
setResolution(long)
public void setResolution(long resolution)