[ndnSIM] Get Current SImulation Time in NFD

mdparamartha95 at students.itb.ac.id mdparamartha95 at students.itb.ac.id
Wed Feb 27 19:56:47 PST 2019

Hi Alex, 

Thank you for the respond. 

I have tried it before, and pass it through double type and not work at all. 

after you told me about the same code I try to run it with logger, and its work, 

the return value of ndn::time::steady_clock::now() not only number but also some string behind the text. 

Is there any simple way to make the return value into second without any string? 

Since in ns3 (Simulator::Now().ToDouble(Time::S)) exist ToDouble(Time:S) function to convert return value into Seconds. 


Best Regards, 
Adi Paramartha 

From: "aa" <aa at cs.fiu.edu> 
To: mdparamartha95 at students.itb.ac.id 
Cc: "ndnsim" <ndnsim at lists.cs.ucla.edu> 
Sent: Wednesday, February 27, 2019 8:52:57 PM 
Subject: Re: [ndnSIM] Get Current SImulation Time in NFD 

NFD is real code, so you should be using ndn::time::* routines for what you want to accomplish. For example, ndn::time::steady_clock::now() 

When inside ndnSIM, these time routines are internally redirected to the simulation time and if you happen to compile your code as normal NFD application, it will use actual time information. 


On Feb 27, 2019, at 4:09 AM, mdparamartha95 at students.itb.ac.id wrote: 


I Would like to record referenced time of each data attach into Content Store, 

How to get the current time in NFD? 

Script " (Simulator::Now().ToDouble(Time::S)) ". 

Doesn't work in NFD environment. 

Any help very appreciate, 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190228/a8ddea06/attachment.html>

More information about the ndnSIM mailing list