--- a/src/simulator/realtime-simulator-impl.cc Wed Oct 15 13:35:49 2008 +0200
+++ b/src/simulator/realtime-simulator-impl.cc Wed Oct 15 14:35:28 2008 +0200
@@ -646,18 +646,19 @@
//
// Schedule an event for a _relative_ time in the future.
//
-EventId
-RealtimeSimulatorImpl::ScheduleRealtime (Time const &time, const Ptr<EventImpl> &impl)
+void
+RealtimeSimulatorImpl::ScheduleRealtime (Time const &time, EventImpl *impl)
{
NS_LOG_FUNCTION (time << impl);
- Scheduler::Event ev;
+
{
CriticalSection cs (m_mutex);
uint64_t ts = m_synchronizer->GetCurrentRealtime () + time.GetTimeStep ();
NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleRealtime(): schedule for time < m_currentTs");
- ev.impl = GetPointer (impl);
+ Scheduler::Event ev;
+ ev.impl = impl;
ev.key.m_ts = ts;
ev.key.m_uid = m_uid;
m_uid++;
@@ -666,14 +667,12 @@
m_synchronizer->Signal ();
}
- return EventId (impl, ev.key.m_ts, ev.key.m_uid);
}
-EventId
-RealtimeSimulatorImpl::ScheduleRealtimeNow (const Ptr<EventImpl> &impl)
+void
+RealtimeSimulatorImpl::ScheduleRealtimeNow (EventImpl *impl)
{
NS_LOG_FUNCTION_NOARGS ();
- Scheduler::Event ev;
{
CriticalSection cs (m_mutex);
@@ -683,7 +682,8 @@
//
uint64_t ts = m_running ? m_synchronizer->GetCurrentRealtime () : m_currentTs;
NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleRealrimeNow(): schedule for time < m_currentTs");
- ev.impl = GetPointer (impl);
+ Scheduler::Event ev;
+ ev.impl = impl;
ev.key.m_ts = ts;
ev.key.m_uid = m_uid;
m_uid++;
@@ -691,8 +691,6 @@
m_events->Insert (ev);
m_synchronizer->Signal ();
}
-
- return EventId (impl, ev.key.m_ts, ev.key.m_uid);
}
Time