public class CPUTimer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CPUTimer.CPUTimerFactory |
Constructor and Description |
---|
CPUTimer(boolean bStart) |
Modifier and Type | Method and Description |
---|---|
void |
add(CPUTimer timer)
add a timer to this
|
long |
getAverageCPUTime() |
long |
getAverageRealTime() |
long |
getCreationTime() |
long |
getCurrentCPUTime() |
long |
getCurrentRealTime() |
static CPUTimer.CPUTimerFactory |
getFactory() |
String |
getName() |
long |
getNumStarts() |
String |
getSingleSummary()
get a summary for a single run
|
long |
getTotalCPUTime()
method to get the amount of cpu time since construction
|
long |
getTotalRealTime()
method to get the amount of real time since construction in milliseconds
|
void |
pause()
stop/pause measuring times - decrement the number of start/stop so that we don't recount the next start
|
void |
println()
simple print utility for lazy folks
|
void |
setName(String name) |
void |
start()
start measuring times
|
void |
stop()
stop/pause measuring times
|
String |
toString() |
KElement |
toXML() |
public CPUTimer(boolean bStart)
bStart
- if true, start measuring nowpublic String getName()
public void add(CPUTimer timer)
timer
- public void setName(String name)
name
- the name to setpublic long getTotalCPUTime()
public long getCurrentCPUTime()
public long getCreationTime()
public long getTotalRealTime()
public long getCurrentRealTime()
public void start()
public void stop()
public void pause()
public long getNumStarts()
public long getAverageRealTime()
public long getAverageCPUTime()
public String toString()
toString
in class Object
Object.toString()
public String getSingleSummary()
public KElement toXML()
public static CPUTimer.CPUTimerFactory getFactory()
public void println()
Copyright © 2018. All rights reserved.