runTasks();
taskTime += System.nanoTime() - asd2;
- System.err.println(" st = " + 1e-9*stepTime + " tt = " + 1e-9*taskTime);
+ //System.err.println(" st = " + 1e-9*stepTime + " tt = " + 1e-9*taskTime);
while(obtainedRealtimeRatio > desiredRealtimeRatio) {
int ran = runTasks();
if(deltaNs > 0) {
synchronized(tasks) {
- try {
- tasks.wait(deltaMs, deltaNsRem);
- } catch (InterruptedException e) {
- e.printStackTrace();
+ if (inState(StandardExperimentStates.Running.class)) {
+ try {
+ tasks.wait(deltaMs, deltaNsRem);
+ } catch (InterruptedException e) {
+ LOGGER.warn("Dynamic experiment thread '" + this.getName() + "' (" + this.getClass().getName() + ") interrupted", e);
+ }
}
}
}
try {
tasks.wait(Integer.MAX_VALUE);
} catch (InterruptedException e) {
- e.printStackTrace();
+ LOGGER.warn("Dynamic experiment thread '" + this.getName() + "' (" + this.getClass().getName() + ") interrupted", e);
}
}
}