{
Timeline timeline = new Timeline(11);
LogicUICanvas ui = new LogicUICanvas(parent, SWT.NONE);
- RSLatchGUIExample.addComponentsAndWires(ui);
+ RSLatchGUIExample.addComponentsAndWires(ui, timeline);
ui.addTransformListener((x, y, z) -> part.setDirty(z < 1));
ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(ui);
userInput.buttonDrag = 3;
while (!ui.isDisposed())
{
// always execute to keep timeline from "hanging behind" for too long
- timeline.executeUpTo(System.currentTimeMillis(), System.currentTimeMillis() + 10);
+ timeline.executeUntil(timeline.laterThan(System.currentTimeMillis()), System.currentTimeMillis() + 10);
long sleepTime;
if (timeline.hasNext())
sleepTime = timeline.nextEventTime() - System.currentTimeMillis();