public interface HeartbeatTimer
HeartbeatThread
calls the tick()
method.Modifier and Type | Method and Description |
---|---|
default long |
getIntervalMs()
Get the interval of HeartbeatTimer.
|
default void |
setIntervalMs(long intervalMs)
Sets the heartbeat interval.
|
void |
tick()
Waits until next heartbeat should be executed.
|
default void setIntervalMs(long intervalMs)
intervalMs
- the heartbeat interval in msdefault long getIntervalMs()
void tick() throws InterruptedException
InterruptedException
- if the thread is interrupted while waitingCopyright © 2023. All Rights Reserved.