Class Timer

  • All Implemented Interfaces:
    java.lang.Comparable<Timer>

    public class Timer
    extends java.lang.Object
    implements java.lang.Comparable<Timer>
    • Field Detail

      • nextExecutionTime

        private volatile long nextExecutionTime
      • onHeap

        public volatile boolean onHeap
      • timedOut

        public static final Event timedOut
      • index

        public int index
    • Method Detail

      • compareTo

        public int compareTo​(Timer o)
        Specified by:
        compareTo in interface java.lang.Comparable<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()