Package org.polyfrost.polyui.utils
Class Clock.FixedTimeExecutor
-
- All Implemented Interfaces:
-
org.polyfrost.polyui.utils.Clock.Executor
public class Clock.FixedTimeExecutor implements Clock.Executor
Create a new FixedTimeExecutor.
- Since:
0.18.1
-
-
Constructor Summary
Constructors Constructor Description Clock.FixedTimeExecutor(Long executeEveryNanos, Integer repeats, Function0<Unit> func)Clock.FixedTimeExecutor(Long executeEveryNanos, Function0<Unit> func)
-
Method Summary
Modifier and Type Method Description final IntegergetCycles()amount of times this has executed. final LonggetExecuteEveryNanos()final IntegergetRepeats()Longtick(Long deltaTimeNanos)Update this Executor. -
-
Method Detail
-
getCycles
final Integer getCycles()
amount of times this has executed. Only incremented when repeats is not 0 (i.e. it does not last forever) to prevent numerical overflow and keep method short.
-
getExecuteEveryNanos
final Long getExecuteEveryNanos()
-
getRepeats
final Integer getRepeats()
-
-
-
-