From faae2542c8eabb8de0e25a58b07798bba42a909a Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 16 May 2019 13:57:38 +0200 Subject: [PATCH] Fixed a bug causing new timeline events to not be processed --- LogicUI/src/era/mi/gui/LogicUI.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/LogicUI/src/era/mi/gui/LogicUI.java b/LogicUI/src/era/mi/gui/LogicUI.java index f2fc5ce0..42b07d3a 100644 --- a/LogicUI/src/era/mi/gui/LogicUI.java +++ b/LogicUI/src/era/mi/gui/LogicUI.java @@ -114,10 +114,9 @@ public class LogicUI Simulation.TIMELINE.executeUpTo(System.currentTimeMillis(), System.currentTimeMillis() + 10); long sleepTime; if(Simulation.TIMELINE.hasNext()) - { sleepTime = Simulation.TIMELINE.nextEventTime() - System.currentTimeMillis(); - } else - sleepTime = 100; + else + sleepTime = 10; try { if(sleepTime > 0) @@ -129,7 +128,7 @@ public class LogicUI simulationThread.start(); Simulation.TIMELINE.addEventAddedListener(event -> { - if(event.getTiming() >= System.currentTimeMillis() / (double) 1) + if(event.getTiming() <= System.currentTimeMillis()) simulationThread.interrupt(); }); -- 2.17.1