New Timeline events notify the simulation thread now
[Mograsim.git] / SampleERCP / src / sampleercp / parts / LogicUIPart.java
index 7ed8377..c142cb6 100644 (file)
@@ -50,5 +50,10 @@ public class LogicUIPart
                        }
                });
                simulationThread.start();
+               Simulation.TIMELINE.addEventAddedListener(event ->
+               {
+                       if (event.getTiming() <= System.currentTimeMillis())
+                               simulationThread.interrupt();
+               });
        }
 }
\ No newline at end of file