Package org.zeromq.timer
Class ZTimer.Timer
java.lang.Object
org.zeromq.timer.ZTimer.Timer
- Enclosing class:
- ZTimer
Opaque representation of a timer.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel()
Cancels a timer.boolean
reset()
Reset the timer.boolean
setInterval
(long interval) Changes the interval of the timer.
-
Field Details
-
delegate
-
-
Constructor Details
-
Timer
Timer(Timers.Timer delegate)
-
-
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 time.- 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.
-