<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">you can create a method, which you will call once at the beginning of your simulation (or schedule an event to be executed later in the simulation). Then, in the main body of your method, you should schedule another event to be executed after a time interval equal to the period that you would like to use.</div><div class=""><br class=""></div><div class="">Please take a look at the Simulator::Schedule method for further details:</div><div class=""><br class=""></div><div class=""><a href="https://www.nsnam.org/doxygen/classns3_1_1_simulator.html#a81c1ade622b5266d81908b2a99a330d2" class="">https://www.nsnam.org/doxygen/classns3_1_1_simulator.html#a81c1ade622b5266d81908b2a99a330d2</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jul 14, 2018, at 10:55 PM, Ming <<a href="mailto:mingdeyou@126.com" class="">mingdeyou@126.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class="">Hello everyone,</div><div class="">Recently, I am writing an algorithm about token buckets. But I have some problems. I want to be able to periodically update the number of tokens in per node. I don't know how to insert the periodically function  into the program.</div><div class=""><br class=""></div><div class="">Can anyone help me solve this problem?Thanks in advanceļ¼</div></div></div></blockquote></div><br class=""></div></body></html>