Package ghidra.util.timer
Class GTimer
java.lang.Object
ghidra.util.timer.GTimer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GTimerMonitorscheduleRepeatingRunnable(long delay, long period, Runnable callback) Schedules a runnable for repeated execution after the specified delay.static GTimerMonitorscheduleRunnable(long delay, Runnable callback) Schedules a runnable for execution after the specified delay.
-
Constructor Details
-
GTimer
public GTimer()
-
-
Method Details
-
scheduleRunnable
Schedules a runnable for execution after the specified delay. A delay value less than 0 will cause this timer to schedule nothing. This allows clients to use this timer class with no added logic for managing timer enablement.- Parameters:
delay- the time (in milliseconds) to wait before executing the runnable. A negative value signals not to run the timer--the callback will not be executedcallback- the runnable to be executed.- Returns:
- a GTimerMonitor which allows the caller to cancel the timer and check its status.
-
scheduleRepeatingRunnable
Schedules a runnable for repeated execution after the specified delay. A delay value less than 0 will cause this timer to schedule nothing. This allows clients to use this timer class with no added logic for managing timer enablement.- Parameters:
delay- the time (in milliseconds) to wait before executing the runnable. A negative value signals not to run the timer--the callback will not be executedperiod- time in milliseconds between successive runnable executionscallback- the runnable to be executed- Returns:
- a GTimerMonitor which allows the caller to cancel the timer and check its status
- Throws:
IllegalArgumentException- ifperiod <= 0
-