Active object: Difference between revisions

Line 1,015:
 
/**
* Integrates input function fK over time
* sS + (fK(t1) + fK(t0)) * (t1 - t0) / 2
*
*
Line 1,025:
private double s, lastS;
private long t0, t1;
private Thread thread;
private volatile boolean run;
 
Line 1,034 ⟶ 1,033:
setInput(input);
run = true;
thread = new Thread(() -> {
while (run) {
try {
Line 1,044 ⟶ 1,043:
}
}
}).start();
thread.start();
}
 
Anonymous user