Class TimerUtil

java.lang.Object
com.itextpdf.commons.utils.TimerUtil

public class TimerUtil extends Object
Utility class for creating and managing timers.
  • Method Details

    • newTimerWithRecurringTask

      public static Timer newTimerWithRecurringTask (Action task, long delay, long period)
      Creates a new Timer instance.
      Parameters:
      task - the task to be executed by the timer
      delay - the delay before the task is executed for the first time
      period - the period between subsequent executions of the task
      Returns:
      a Timer instance that executes the task at the specified interval
    • stopTimer

      public static void stopTimer (Timer timer)
      Stops the given Timer instance.
      Parameters:
      timer - the Timer instance to stop