public class Timer extends LongCounter
totalCount
Constructor and Description |
---|
Timer(String name)
Constructor
|
Timer(String name,
boolean start)
Constructor
|
Timer(String name,
boolean start,
boolean mergephases)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected long |
getCurrentValue()
Get the current value for this timer
|
double |
getTotalMillis() |
(package private) void |
printMicro(long value)
Print a value in microseconds
|
(package private) void |
printMillis(long value)
Print a value in milliseconds
|
(package private) void |
printSecs(long value)
Print a value in seconds
|
(package private) void |
printTotalMicro()
Print the total in microseconds
|
void |
printTotalMillis()
Print the total in milliseconds
|
void |
printTotalSecs()
Print the total in seconds
|
(package private) void |
printValue(long value)
Print a value (in milliseconds)
|
getLastTotal, phaseChange, printCount, printMax, printMin, printTotal, printTotal, start, stop
getColumnSuffix, getName, getStart, isComplex, mergePhases, printLast
public Timer(String name)
name
- The name to be associated with this counterpublic Timer(String name, boolean start)
name
- The name to be associated with this counterstart
- True if this counter is to be implicitly started
when startAll()
is called (otherwise the counter
must be explicitly started).public Timer(String name, boolean start, boolean mergephases)
name
- The name to be associated with this counterstart
- True if this counter is to be implicitly started
when startAll()
is called (otherwise the counter
must be explicitly started).mergephases
- True if this counter does not separately
report GC and Mutator phases.protected final long getCurrentValue()
getCurrentValue
in class LongCounter
final void printTotalMicro()
public final void printTotalMillis()
public final void printTotalSecs()
final void printValue(long value)
printValue
in class LongCounter
value
- The value to be printedfinal void printMicro(long value)
value
- The value to be printedfinal void printMillis(long value)
value
- The value to be printedfinal void printSecs(long value)
value
- The value to be printedpublic final double getTotalMillis()