public static final double TIME_TOLERANCE = 1e-6;
double currentTime;
- volatile boolean stopped;
+ volatile boolean stopped = false;
ArrayList<Function1<Tuple0, Object>> scheduledNow = new ArrayList<>();
ArrayList<Function1<Tuple0, Object>> scheduledNextStep = new ArrayList<>();
ArrayList<Function1<StopReason, Object>> scheduledWhenStopped = new ArrayList<>();
}
Task firstTask = scheduledAt.peek();
if(firstTask == null) {
- if (scheduledNextStep.isEmpty())
+ if (scheduledNextStep.isEmpty()) {
+ if (LOGGER.isTraceEnabled())
+ LOGGER.trace("No work to schedule, stopping empty sequence", new Exception("trace"));
stopped = true;
+ }
return Double.POSITIVE_INFINITY;
} else if(firstTask.time > currentTime+TIME_TOLERANCE) {
return firstTask.time;