New Timeline events notify the simulation thread now
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Thu, 23 May 2019 11:47:19 +0000 (13:47 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Thu, 23 May 2019 11:47:19 +0000 (13:47 +0200)
SampleERCP/src/sampleercp/parts/LogicUIPart.java

index 7ed8377..c142cb6 100644 (file)
@@ -50,5 +50,10 @@ public class LogicUIPart
                        }
                });
                simulationThread.start();
                        }
                });
                simulationThread.start();
+               Simulation.TIMELINE.addEventAddedListener(event ->
+               {
+                       if (event.getTiming() <= System.currentTimeMillis())
+                               simulationThread.interrupt();
+               });
        }
 }
\ No newline at end of file
        }
 }
\ No newline at end of file