public final class IntervalTimer extends AbstractIntervalTimerSupplier
AccumulatedTimerSupplier.| Constructor and Description |
|---|
IntervalTimer()
Creates a new timer in the
StatisticState.UNAVAILABLE state. |
| Modifier and Type | Method and Description |
|---|---|
long |
getEndTimeMillis()
Returns the end time if finished, the current time if running, or an undefined value if never started.
|
long |
getStartTimeMillis()
This will return the start time or an undefined value if never started.
|
StatisticState |
getState()
Returns the current state of the supplier.
|
IntervalTimerSnapshot |
snapshot()
Creates a snapshot of this timer.
|
void |
start()
Starts the timer; time will begin to accumulate
|
void |
stop()
Stops the timer.
|
getTimeIntervalMillispublic IntervalTimer()
StatisticState.UNAVAILABLE state.public StatisticState getState()
StatisticSupplierpublic void start()
IllegalStateException - if the timer is already
started or has finishedpublic void stop()
finally block.public IntervalTimerSnapshot snapshot()
IntervalTimerSupplierStatisticState.ACTIVEpublic long getStartTimeMillis()
IntervalTimerSupplierpublic long getEndTimeMillis()
IntervalTimerSupplierStatisticState.ACTIVE state, then this value will reflect the time at which
the snapshot was taken.Copyright © 2020 Actian Corporation. All rights reserved.