Interface Timer

  • All Superinterfaces:
    NeedsClose
    All Known Implementing Classes:
    DefaultTimer

    public interface Timer
    extends NeedsClose
    Timer for triggering expiry or refresh.
    Author:
    Jens Wilke
    • Method Detail

      • schedule

        void schedule​(TimerTask task,
                      long time)
        Schedule the specified timer task for execution at the specified time, in milliseconds. If the execution time is reached already the task is executed immediately in a separate thread.
        Parameters:
        time - the time when the task should be run. must be positive or 0.
      • cancel

        void cancel​(TimerTask t)
        Cancel the timer task.
      • cancelAll

        void cancelAll()
        Terminates all timer tasks currently pending.
      • getLagMillis

        long getLagMillis()
        The lag time tasks may lag behind.