Interface Timer

    • Method Detail

      • schedule

        TimerTask schedule​(long delayInMillis,
                           Runnable task)
        Schedules the task to be executed in delayInMillis on this timer's default Executor.

        Equivalent to schedule(delayInMillis, task, null).

      • schedule

        TimerTask schedule​(long delayInMillis,
                           Runnable task,
                           Executor executor)
        Schedules the task to be executed in delayInMillis on given executor. If executor is null, this timer's default executor is used.
      • countScheduledTasks

        int countScheduledTasks()
        Returns the number of tasks that are currently scheduled for execution by the timer. Finished tasks and tasks that are already running are not included.
        Returns:
        the number of currently scheduled tasks