boolean done = waitUntil(condition, _timeout);
if (!done) {
_logger.log(Level.SEVERE, String.format
("Timeout when waiting for condition %s after %s ms",
condition, _timeout));
throw new TimeoutException();
}
return done;
} else {
return waitUntil(condition, 0);
}