RealtimeSimulatorImpl::ProcessOneEvent (void){
...
...
if (m_synchronizer->Synchronize (tsNow, tsDelay)){
NS_LOG_LOGIC ("Interrupted ...");
break;
}
...
...
Scheduler::Event next; {
CriticalSection cs (m_mutex);
// We do know we're waiting for an event, so there had better be an event on the
// event queue. Let's pull it off. When we release the critical section, the
// event we're working on won't be on the list and so subsequent operations won't
// mess with us.
NS_ASSERT_MSG (m_events->IsEmpty () == false,
"RealtimeSimulatorImpl::ProcessOneEvent(): event queue is empty");
next = m_events->RemoveNext ();
m_unscheduledEvents--;
// We cannot make any assumption that "next" is the same event we originally waited for.
// We can only assume that only that it must be due and cannot cause time
// to move backward.