public class RTimer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected SimpleOrderedMap<RTimer> |
children |
protected double |
culmTime |
static int |
PAUSED |
static int |
STARTED |
protected double |
startTime |
protected int |
state |
static int |
STOPPED |
protected double |
time |
Constructor and Description |
---|
RTimer() |
Modifier and Type | Method and Description |
---|---|
NamedList |
asNamedList() |
SimpleOrderedMap<RTimer> |
getChildren()
Manipulating this map may have undefined results.
|
double |
getTime()
Get total elapsed time for this timer.
|
static void |
main(java.lang.String[] argv)
Testing
|
protected double |
now()
Get current time
May override to implement a different timer (CPU time, etc).
|
void |
pause() |
void |
resume() |
double |
stop()
Recursively stop timer and sub timers
|
RTimer |
sub(java.lang.String desc)
Create new subtimer with given name
Subtimer will be started.
|
java.lang.String |
toString() |
public static final int STARTED
public static final int STOPPED
public static final int PAUSED
protected int state
protected double startTime
protected double time
protected double culmTime
protected SimpleOrderedMap<RTimer> children
protected double now()
public double stop()
public void pause()
public void resume()
public double getTime()
public RTimer sub(java.lang.String desc)
public java.lang.String toString()
toString
in class java.lang.Object
public NamedList asNamedList()
public SimpleOrderedMap<RTimer> getChildren()
public static void main(java.lang.String[] argv) throws java.lang.InterruptedException
java.lang.InterruptedException