return millisSince(Tasks.getLatestEvent(task)) >= minRunningTime.as(Time.MILLISECONDS);
}
private boolean appearsStuck(IScheduledTask task) {
// Walk task events backwards to find the first event, or first non-running event.
ITaskEvent earliestNonRunningEvent = task.getTaskEvents().get(0);
for (ITaskEvent event : Lists.reverse(task.getTaskEvents())) {
if (event.getStatus() == RUNNING) {
break;
} else {
earliestNonRunningEvent = event;