mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Added TimeUnit#getMillis method
This commit is contained in:
parent
aaa3b91424
commit
779e6bd22e
@ -11,4 +11,8 @@ public class TimeUnit {
|
||||
public static final TemporalUnit MILLISECOND = ChronoUnit.MILLIS;
|
||||
public static final TemporalUnit SERVER_TICK = Tick.SERVER_TICKS;
|
||||
public static final TemporalUnit CLIENT_TICK = Tick.CLIENT_TICKS;
|
||||
|
||||
public static long getMillis(long amount, TemporalUnit unit) {
|
||||
return unit.getDuration().multipliedBy(amount).toMillis();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user