From: Daniel Kirschten Date: Thu, 23 May 2019 11:47:19 +0000 (+0200) Subject: New Timeline events notify the simulation thread now X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=cc5749d29d0a2e37262ec10925676c812a2fa734;p=Mograsim.git New Timeline events notify the simulation thread now --- diff --git a/SampleERCP/src/sampleercp/parts/LogicUIPart.java b/SampleERCP/src/sampleercp/parts/LogicUIPart.java index 7ed8377e..c142cb67 100644 --- a/SampleERCP/src/sampleercp/parts/LogicUIPart.java +++ b/SampleERCP/src/sampleercp/parts/LogicUIPart.java @@ -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