public Auditor getAuditor(int timeout, TimeUnit unit) throws Exception {
final long timeoutAt = System.nanoTime() + TimeUnit.NANOSECONDS.convert(timeout, unit);
while (System.nanoTime() < timeoutAt) {
for (AutoRecoveryMain p : autoRecoveryProcesses.values()) {
Auditor a = p.getAuditor();
if (a != null) {
return a;
}
}
Thread.sleep(100);