Added a command to display remaining time

This commit is contained in:
auto committed 2023-10-01 21:44:39 +02:00
1 parent e83b811d34
commit 68304098fb
1 file changed
+6
@@ -80,4 +80,10 @@ public class EventManager {
))))); )))));
server.sendMessage(message.get()); server.sendMessage(message.get());
} }
public Duration getTimeRemaining() {
if (duration == null)
return Duration.ofMillis(0);
return duration.minus(Duration.between(startTime, Instant.now()));
}
} }