Class ZTimer.Timer

  • Enclosing class:
    ZTimer

    public static final class ZTimer.Timer
    extends java.lang.Object
    Opaque representation of a timer.
    • Constructor Summary

      Constructors 
      Constructor Description
      Timer​(Timers.Timer delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel()
      Cancels a timer.
      boolean reset()
      Reset the timer.
      boolean setInterval​(long interval)
      Changes the interval of the timer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.