public static class ThreadBarrier.BarrierTimer
extends java.lang.Object
implements java.lang.Runnable
ThreadBarrier
to
measure performance between barrier awaits. This runnable will execute
when the barrier is tripped. Make sure to reset() the timer before next
Measurement.Constructor and Description |
---|
BarrierTimer() |
Modifier and Type | Method and Description |
---|---|
long |
getTimeInNanos()
Returns the elapsed time between two successive barrier executions.
|
double |
getTimeInSeconds()
Returns the elapsed time between two successive barrier executions.
|
void |
reset()
resets (clears) this timer before next execution.
|
void |
run() |
public void run()
run
in interface java.lang.Runnable
public void reset()
public long getTimeInNanos()
public double getTimeInSeconds()