Package kilim.timerservice
Class Timer
java.lang.Object
kilim.timerservice.Timer
- All Implemented Interfaces:
Comparable<Timer>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()intlongvoidsetLiteral(long value) set the timer value explicitly, ie not relative to the current timevoidsetTimer(long timeoutMillis) set the timer relative to the current time, ie set a delay (in milliseconds)
-
Field Details
-
nextExecutionTime
private volatile long nextExecutionTime -
onQueue
-
onHeap
public volatile boolean onHeap -
TIMED_OUT
public static final int TIMED_OUT- See Also:
-
timedOut
-
index
public int index -
es
-
-
Constructor Details
-
Timer
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<Timer>
-
setTimer
public void setTimer(long timeoutMillis) set the timer relative to the current time, ie set a delay (in milliseconds) -
setLiteral
public void setLiteral(long value) set the timer value explicitly, ie not relative to the current time -
cancel
public void cancel() -
getExecutionTime
public long getExecutionTime()
-