public class RTimer extends 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(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(String desc)
Create new subtimer with given name
Subtimer will be started.
|
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 NamedList asNamedList()
public SimpleOrderedMap<RTimer> getChildren()
public static void main(String[] argv) throws InterruptedException
InterruptedException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.