diff --git a/src/core/model/simulator.cc b/src/core/model/simulator.cc index c89575777..806cfa04a 100644 --- a/src/core/model/simulator.cc +++ b/src/core/model/simulator.cc @@ -190,11 +190,12 @@ Simulator::Stop() GetImpl()->Stop(); } -void +EventId Simulator::Stop(const Time& delay) { NS_LOG_FUNCTION(delay); m_stopEvent = GetImpl()->Stop(delay); + return m_stopEvent; } EventId diff --git a/src/core/model/simulator.h b/src/core/model/simulator.h index 738f52459..1e31d605a 100644 --- a/src/core/model/simulator.h +++ b/src/core/model/simulator.h @@ -166,12 +166,14 @@ class Simulator * or equal to the stop time. The stop time is relative to the * current simulation time. * @param [in] delay The stop time, relative to the current time. + * @return The stop EventId. */ - static void Stop(const Time& delay); + static EventId Stop(const Time& delay); /** * Returns the Stop Event, or an invalid event if the simulation * does not have a scheduled stop time. + * @return The stop EventId. */ static EventId GetStopEvent();