[Ns-developers] Application::Start/Stop, time parameter inconsistent with Simulator::Schedule
Gustavo Carneiro
gjcarneiro at gmail.com
Tue May 27 06:44:23 PDT 2008
I am looking at some student's code and I found this:
ooffi->Start (Simulator::Now ());
ooffi->Stop(Simulator::Now() +Seconds(120.0));
Simulator::Schedule (Simulator::Now() +Seconds(120.0),
&GtpUmts::EraseFirstLoadFactor,&umts);
I am guessing that, most likely, the Simulator::Schedule call is wrong and
should be Simulator::Schedule (Seconds(120.0), ...) instead.
Alas, it's easy to make this mistake since Application::Start/Stop() accept
absolute time, while Simulator::Schedule accepts relative time...
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list