diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TimeoutTimer.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TimeoutTimer.java index af6df57..fe13903 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TimeoutTimer.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TimeoutTimer.java @@ -50,7 +50,7 @@ public class TimeoutTimer { if (player1AlmostTimeout != null) player1AlmostTimeout.cancel(false); player1AlmostTimeout = timer.schedule(() -> { - almostTimeoutCallback.accept(participant, almostTimeoutTime - timeoutTime); + almostTimeoutCallback.accept(participant, timeoutTime - almostTimeoutTime); return participant; }, this.almostTimeoutTime, TimeUnit.SECONDS); @@ -66,7 +66,7 @@ public class TimeoutTimer { if (player2AlmostTimeout != null) player2AlmostTimeout.cancel(false); player2AlmostTimeout = timer.schedule(() -> { - almostTimeoutCallback.accept(participant, almostTimeoutTime - timeoutTime); + almostTimeoutCallback.accept(participant, timeoutTime - almostTimeoutTime); return participant; }, this.almostTimeoutTime, TimeUnit.SECONDS);