public final class TimeMeter extends AbstractMeter implements TimeSensor
Constructor and Description |
---|
TimeMeter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(long time)
Adds a time sample to the probe
|
double |
calculate()
Calculate the current value based on the previous sample().
|
void |
sample()
Return the probe's next sample.
|
getName, peek, toString
public final void add(long time)
TimeSensor
add
in interface TimeSensor
public final void sample()
sample
in interface Meter
sample
in class AbstractMeter
public final double calculate()
AbstractMeter
calculate
in interface Meter
calculate
in class AbstractMeter