public final class AccumulatedTimer extends Object implements AccumulatedTimerSupplier
AccumulatedTimerSupplier.| Constructor and Description |
|---|
AccumulatedTimer()
Creates a new timer in the
StatisticState.UNAVAILABLE state. |
| Modifier and Type | Method and Description |
|---|---|
long |
getAccumulatedTimeMillis()
The accumulated time so far.
|
StatisticState |
getState()
Returns the current state of the supplier.
|
void |
pause()
Pauses the timer; time will not accumulate until the next call to
start(). |
AccumulatedTimerSupplier |
snapshot()
Creates a snapshot of this timer.
|
void |
start()
Starts the timer; time will begin to accumulate
|
void |
stop()
Stops the timer.
|
public AccumulatedTimer()
StatisticState.UNAVAILABLE state.public StatisticState getState()
StatisticSuppliergetState in interface StatisticSupplierpublic void start()
IllegalStateException - if the timer is already
started or has finishedpublic void pause()
start().public void stop()
finally block.public long getAccumulatedTimeMillis()
AccumulatedTimerSupplierAccumulatedTimerSupplier.getAccumulatedTimeMillis().
This value is undefined if the timer is StatisticState.UNAVAILABLE.getAccumulatedTimeMillis in interface AccumulatedTimerSupplierpublic AccumulatedTimerSupplier snapshot()
AccumulatedTimerSupplierStatisticState.ACTIVEsnapshot in interface AccumulatedTimerSuppliersnapshot in interface StatisticSupplierCopyright © 2024 Actian Corporation. All rights reserved.