src/simulator/simulator.cc
changeset 1009 adc3ac9baea8
parent 1008 6f2ea723a1db
child 1010 3a252ceeac44
equal deleted inserted replaced
1008:6f2ea723a1db 1009:adc3ac9baea8
   136 }
   136 }
   137 
   137 
   138 void
   138 void
   139 SimulatorPrivate::ProcessOneEvent (void)
   139 SimulatorPrivate::ProcessOneEvent (void)
   140 {
   140 {
   141   EventId next = m_events->PeekNext ();
   141   EventId next = m_events->RemoveNext ();
   142   m_events->RemoveNext ();
       
   143 
   142 
   144   NS_ASSERT (next.GetTs () >= m_currentTs);
   143   NS_ASSERT (next.GetTs () >= m_currentTs);
   145   --m_unscheduledEvents;
   144   --m_unscheduledEvents;
   146 
   145 
   147   TRACE ("handle " << nextEv);
   146   TRACE ("handle " << nextEv);
   149   m_currentUid = next.GetUid ();
   148   m_currentUid = next.GetUid ();
   150   if (m_logEnable) 
   149   if (m_logEnable) 
   151     {
   150     {
   152       m_log << "e "<<next.GetUid () << " " << next.GetTs () << std::endl;
   151       m_log << "e "<<next.GetUid () << " " << next.GetTs () << std::endl;
   153     }
   152     }
   154   Ptr<EventImpl> event = next.GetEventImpl ();
   153   EventImpl *event = next.PeekEventImpl ();
   155   event->Invoke ();
   154   event->Invoke ();
   156 }
   155 }
   157 
   156 
   158 bool 
   157 bool 
   159 SimulatorPrivate::IsFinished (void) const
   158 SimulatorPrivate::IsFinished (void) const