class Emu.StatusReportingThread
extends java.lang.Thread
Java calls to get the time are notoriously slow - System.currentTimeMillis() and .nanoTime(). We implement a low resolution clock here, for things like flushing output channels when there are low rates, which allows other code to avoid calling these expensive methods directly.
Constructor and Description |
---|
StatusReportingThread() |
Modifier and Type | Method and Description |
---|---|
long |
getTime()
Get the time from System.currentTimeMillis(), but it's updated
only every 1/4 seconds or thereabouts.
|
void |
run()
Send a status message every 2 (statusReportingPeriod/1000) seconds.
|
(package private) void |
sendStatusMessage()
Send a cMsg message with the status of this EMU to run control's cMsg server.
|
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 long getTime()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
void sendStatusMessage()