[ndnSIM] Printing timestamps with a message for a simulation

DJEMAA Adel a_djemaa at esi.dz
Mon May 16 15:47:48 PDT 2022


Hi,
Try this:
ns3::Simulator::Now().GetSeconds();
Hope this helps.


Le lun. 16 mai 2022 à 01:58, Sai Gautam Mandapati via ndnSIM <
ndnsim at lists.cs.ucla.edu> a écrit :

> Hi everyone,
>
> 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: *std::cout <<
> Simulator::Now() <<" print this" << std::endl;* 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.
>
> --
>
> *Sai Gautam Mandapati*
>
> Deakin University
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>


-- 
Mr DJAMA Adel
Phd student
Ecole Militaire Polytechnique
Algiers 16046, ALGERIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20220516/671a5ad7/attachment.html>


More information about the ndnSIM mailing list