public interface TimerService
Modifier and Type | Method and Description |
---|---|
void |
disableStats()
Disable statistics.
|
void |
enableStats()
Enable statistics.
|
long |
getInvocationCount()
Return invocation count.
|
long |
getLastDrift()
Return last drift.
|
long |
getMaxDrift()
Return maximum drift.
|
long |
getTotalDrift()
Return total drift.
|
void |
setCallback(TimerCallback timerCallback)
Set the callback method to invoke for clock ticks.
|
void |
startInternalClock()
Start clock expecting callbacks at regular intervals and a fixed rate.
|
void |
stopInternalClock(boolean warnIfNotStarted)
Stop internal clock.
|
void setCallback(TimerCallback timerCallback)
timerCallback
- is the callbackvoid startInternalClock()
void stopInternalClock(boolean warnIfNotStarted)
warnIfNotStarted
- use true to indicate whether to warn if the clock is not started, use false to not warn
and expect the clock to be not started.void enableStats()
void disableStats()
long getMaxDrift()
long getLastDrift()
long getTotalDrift()
long getInvocationCount()