Class Timers.Timer
java.lang.Object
zmq.util.Timers.Timer
- Enclosing class:
Timers
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTimer(Timers parent, long interval, Timers.Handler handler, Object... args) -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()Cancels a timer.booleanreset()Reset the timer.booleansetInterval(long interval) Changes the interval of the timer.
-
Field Details
-
parent
-
interval
private long interval -
alive
private boolean alive -
handler
-
args
-
-
Constructor Details
-
Timer
-
-
Method Details
-
setInterval
public boolean setInterval(long interval) Changes the interval of the timer. This method is slow, canceling existing and adding a new timer yield better performance.- Parameters:
interval- the new interval of the timer.- Returns:
- true if set, otherwise false.
-
reset
public boolean reset()Reset the timer. This method is slow, canceling existing and adding a new timer yield better performance.- Returns:
- true if reset, otherwise false.
-
cancel
public boolean cancel()Cancels a timer.- Returns:
- true if cancelled, otherwise false.
-