From 66fbbada48df8f73a4f1df78c68e4cea92fda4ab Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 24 Apr 2024 18:49:18 -0500 Subject: [PATCH] mines close on time --- src/engine/workthreads/MineThread.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/workthreads/MineThread.java b/src/engine/workthreads/MineThread.java index 6f99a55e..281e21f0 100644 --- a/src/engine/workthreads/MineThread.java +++ b/src/engine/workthreads/MineThread.java @@ -22,7 +22,7 @@ public class MineThread implements Runnable { } @Override public void run() { - LocalDateTime nextPulse = LocalDateTime.now().withMinute(0).withSecond(0); + LocalDateTime nextPulse = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); while (true){ if(LocalDateTime.now().isAfter(nextPulse)) { for (Mine mine : Mine.getMines()) { @@ -42,7 +42,7 @@ public class MineThread implements Runnable { minute = 30; LocalDateTime openTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(minute).withSecond(0); - LocalDateTime closeTime = openTime.plusMinutes(30); + LocalDateTime closeTime = openTime.plusMinutes(29); //current time is after start time and before close time, open mine window if (LocalDateTime.now().isAfter(openTime.minusMinutes(1)) && !mine.wasClaimed && !mine.wasOpened) {