<div dir="ltr">Hi,<div>Try this: </div><div><span style="color:rgb(0,0,0);font-family:"Courier New",Courier,monospace,arial,sans-serif;font-size:14px;white-space:pre-wrap">ns3::Simulator::Now().GetSeconds();</span></div><div><span style="color:rgb(0,0,0);font-family:"Courier New",Courier,monospace,arial,sans-serif;font-size:14px;white-space:pre-wrap">Hope this helps.</span></div><div><span style="color:rgb(0,0,0);font-family:"Courier New",Courier,monospace,arial,sans-serif;font-size:14px;white-space:pre-wrap"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 16 mai 2022 à 01:58, Sai Gautam Mandapati via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I hope you are well. I have a question for you and need some clarification. So, in my simulation, I'm trying to build a network where specific nodes start sending the packets at a particular time and stop. So, I'm trying to print an exact simulation time with a message in the terminal. I have tried putting the statement:
<b>std::cout << Simulator::Now() <<" print this" << std::endl;</b> in the loop where my nodes are present, but all I get is 0.0ns as that is the setting up time of the code before the loop starts. Can anyone please guide me on how to get what I want? I appreciate any help you can provide.   </div><br>-- <br><div dir="ltr"><div dir="ltr"><p><b>Sai Gautam Mandapati</b></p>

<p>Deakin University</p><br></div></div></div>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Mr DJAMA Adel<br></div><div>Phd student </div><div>Ecole Militaire Polytechnique</div><div>Algiers 16046, ALGERIA</div></div></div>