Package com.itextpdf.commons.utils
Class TimerUtil
java.lang.Object
com.itextpdf.commons.utils.TimerUtil
Utility class for creating and managing timers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Timer
newTimerWithRecurringTask
(Action task, long delay, long period) Creates a new Timer instance.static void
Stops the given Timer instance.
-
Method Details
-
newTimerWithRecurringTask
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
Stops the given Timer instance.- Parameters:
-
timer
- the Timer instance to stop
-