<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 18, 2015 at 9:24 AM, zxq9 <span dir="ltr"><<a href="mailto:zxq9@zxq9.com" target="_blank">zxq9@zxq9.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">EventStamp = {monotonic_time(), unique_integer([monotonic])}.</blockquote></div><br></div><div class="gmail_extra">This can also repeat! monotonic_time() starts at the same point whenever the Erlang system reboots:<br><br>-module(z).<br>-export([t/0]).<br><br>t() -><br>    io:format("~p~n", [erlang:monotonic_time()]),<br>    ok.<br><br>tiefling:~ jlouis$ for i in $(jot 10 1 10) ; do erl -noshell -s z t -s erlang halt; done<br>-576460751926879092<br>-576460751926869976<br>-576460751923585212<br>-576460751924209286<br>-576460751925308499<br>-576460751926073063<br>-576460751927201176<br>-576460751927514165<br>-576460751927189332<br>-576460751925751652<br></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">So the more you restart the system, the grater risk of it repeating. You probably want to use erlang:system_time().<br><br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">J.</div>
</div></div>