bring back Next since it is used internally

This commit is contained in:
Mathieu Lacage
2012-03-28 09:02:14 -04:00
parent 9e060ffa10
commit 0e8b2225af
2 changed files with 16 additions and 0 deletions

View File

@@ -253,6 +253,20 @@ DistributedSimulatorImpl::IsFinished (void) const
return m_events->IsEmpty () || m_stop;
}
uint64_t
DistributedSimulatorImpl::NextTs (void) const
{
NS_ASSERT (!m_events->IsEmpty ());
Scheduler::Event ev = m_events->PeekNext ();
return ev.key.m_ts;
}
Time
DistributedSimulatorImpl::Next (void) const
{
return TimeStep (NextTs ());
}
void
DistributedSimulatorImpl::Run (void)
{

View File

@@ -121,6 +121,8 @@ private:
void CalculateLookAhead (void);
void ProcessOneEvent (void);
uint64_t NextTs (void) const;
Time Next (void) const;
typedef std::list<EventId> DestroyEvents;
DestroyEvents m_destroyEvents;