From cc5749d29d0a2e37262ec10925676c812a2fa734 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 23 May 2019 13:47:19 +0200 Subject: [PATCH] New Timeline events notify the simulation thread now --- SampleERCP/src/sampleercp/parts/LogicUIPart.java | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.17.1