- All Known Subinterfaces:
AsyncExecutor,SyncExecutor,TaskExecutor
- All Known Implementing Classes:
AbstractSyncExecutor,SimpleAsyncExecutor
public interface TickAdapter
Allows converting time to game ticks.
-
Method Summary
-
Method Details
-
toTicks
Convert the given time to game ticks.- Parameters:
time- the amount of timeunit- the time unit- Returns:
- the result in game ticks
-
toMillis
default long toMillis(int ticks) Convert game ticks toTimeUnit.MILLISECONDS.- Parameters:
ticks- the amount of game ticks- Returns:
- the result in milliseconds.
-
convert
Convert ticks to a unit of time.- Parameters:
ticks- the amount of game ticksunit- the time unit to convert to- Returns:
- the result in the provided unit
-