| 1234567891011121314151617 |
- package antiafk.timeUntil;
- import java.time.Duration;
- import java.time.Instant;
- public class TimeUntil {
- public long calcBetween(Instant event) {
- if (event == null) return 0;
- Instant now = Instant.now();
- Duration diff = Duration.between(event, now);
- return diff.toMillis();
- }
- public Instant getNowInInstant() {
- return Instant.now();
- }
- }
|