controller.getThreadMonitor().threadPaused(threadName); // to sync up with signal...
++waiting;
conditionObject.await();
} catch (InterruptedException e) {
// Wait for ns-2
ProtolibTimer timer = new ProtolibTimer(controller, 0, 0);
timer.startTimerAndBlockUntilTimeout();
throw e;
} catch (IllegalMonitorStateException illmon) {
logger.error("Error Message: " + illmon.getMessage());
logger.error("Thread now = " + Thread.currentThread());
illmon.printStackTrace();
System.exit(0);
}
Logging.conditionStatus(controller, Logging.ConditionStatusType.AWAIT_RELEASED, threadName);
// Wait for ns-2
ProtolibTimer timer = new ProtolibTimer(controller, 0, 0); // and then immediately stopping
timer.startTimerAndBlockUntilTimeout(); // and then starting again once timer has returned
// carry on now since we have woken up ns-2
}