<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Begin forwarded message:</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<br class="">
</div>
<br class="">
<div class="">The attached message has been automatically discarded.<br class="">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">From:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Andre Dexheimer Carneiro <<a href="mailto:andre.dexheimer@inf.ufrgs.br" class="">andre.dexheimer@inf.ufrgs.br</a>><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">Subject:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Problems measuring elapsed time in MiniNDN experiment</b><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">Date:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">September 8, 2020 at 9:41:38 PM CDT<br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(127, 127, 127, 1.0);" class=""><b class="">To:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><a href="mailto:mini-ndn@lists.cs.ucla.edu" class="">mini-ndn@lists.cs.ucla.edu</a><br class="">
</span></div>
<br class="">
<br class="">
Hi,<br class="">
<br class="">
<br class="">
I am writing an experiment which instantiates NDN producers and consumers as an attempt to simulate a specific scenario with multiple hosts. However, I can't seem to measure the elapsed time correctly, my code right now is:<br class="">
<br class="">
-----<br class="">
  dtBegin   = std::chrono::steady_clock::now();<br class="">
  m_face.expressInterest(interest, bind(&Consumer::onData, this,   _1, _2),<br class="">
     bind(&Consumer::onNack, this, _1, _2), bind(&Consumer::onTimeout, this, _1));<br class="">
<br class="">
  // processEvents will block until the requested data is received or a timeout occurs<br class="">
  m_face.processEvents();<br class="">
<br class="">
  dtEnd       = std::chrono::steady_clock::now();<br class="">
  m_sTimeDiff = std::chrono::duration_cast<std::chrono::microseconds>(dtEnd - dtBegin).count();\<br class="">
-----<br class="">
<br class="">
Everything seems to work fine, with nodes receiving and sending data as they should, however the recorded times are usually at around 1000 us, which is completely unrealistic as the links have between 2ms and 1000ms delay in my topology. Could anybody cast
 some light into how to get this metric correctly?<br class="">
<br class="">
<br class="">
<br class="">
Thanks in advance.<br class="">
<br class="">
AndrĂ© Dexheimer Carneiro<br class="">
Computer Enginnering - UFRGS<br class="">
<br class="">
<br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>