[ndnSIM] Printing timestamps with a message for a simulation

Sai Gautam Mandapati saigautam96 at gmail.com
Mon May 16 18:00:46 PDT 2022


Hi DJEMAA,

Thanks for your reply. I'm not getting any timestamp on the terminal when I
insert this into my code. It's not working.

Sai.

On Tue, May 17, 2022 at 8:47 AM DJEMAA Adel <a_djemaa at esi.dz> wrote:

> 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/20220517/a677dfea/attachment.html>


More information about the ndnSIM mailing list