<div class="gmail_quote">2012/7/12 Wojtek Narczyński <span dir="ltr"><<a href="mailto:wojtek@power.com.pl" target="_blank">wojtek@power.com.pl</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>On 07/12/2012 02:58 PM, Erik Søe
      Sørensen wrote:<br>
    </div>
    <blockquote type="cite">
      <div class="gmail_quote">When I implemented now() in Erjang, I
        found a lock-free algorithm for it which has the right
        "timestamp must be monotonically increasing" property.<br>
      </div>
    </blockquote>
    <br>
    
    </div><a href="http://www.erlang.org/doc/man/erlang.html#now-0" target="_blank">http://www.erlang.org/doc/man/erlang.html#now-0</a><br>
    "
    
    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px">It is also guaranteed that
      subsequent calls to this BIF returns continuously increasing
      values."<br>
      <br>
      I don't think </span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px">your solution quarrantees this.<br>
</span></div></blockquote><div>Why not? That's certainly the intention of the last part; latest_now should always be updated in a increasing manner, and the return value of ensure_monotonically_increasing_now() should always be equal to the new value of latest_now.<br>
Did I make a mistake?<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px">
      <br>
      It can be implemented with N-bit CAS for N-bit time value.<br>
      <br>
      --Regards,<br>
      Wojtek Narczynski<br>
    </span>
  </div>

<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br>