Package com.mojang.realmsclient.gui.task
Class RepeatableTask
java.lang.Object
com.mojang.realmsclient.gui.task.RepeatableTask
- All Implemented Interfaces:
Runnable
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Duration
private final BooleanSupplier
private final RestartDelayCalculator
private final Runnable
-
Constructor Summary
ModifierConstructorDescriptionprivate
RepeatableTask
(Runnable p_167577_, Duration p_167578_, BooleanSupplier p_167579_, RestartDelayCalculator p_167580_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
schedule
(ScheduledExecutorService p_167586_) static RepeatableTask
withImmediateRestart
(Runnable p_167588_, Duration p_167589_, BooleanSupplier p_167590_) static RepeatableTask
withRestartDelayAccountingForInterval
(Runnable p_167582_, Duration p_167583_, BooleanSupplier p_167584_)
-
Field Details
-
isActive
-
restartDelayCalculator
-
interval
-
runnable
-
-
Constructor Details
-
RepeatableTask
private RepeatableTask(Runnable p_167577_, Duration p_167578_, BooleanSupplier p_167579_, RestartDelayCalculator p_167580_)
-
-
Method Details
-
run
public void run() -
schedule
-
withRestartDelayAccountingForInterval
public static RepeatableTask withRestartDelayAccountingForInterval(Runnable p_167582_, Duration p_167583_, BooleanSupplier p_167584_) -
withImmediateRestart
public static RepeatableTask withImmediateRestart(Runnable p_167588_, Duration p_167589_, BooleanSupplier p_167590_)
-