<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 25, 2018 at 2:59 PM, Xiao Yang <span dir="ltr"><<a href="mailto:yangx.jy@cn.fujitsu.com" target="_blank">yangx.jy@cn.fujitsu.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"><u></u>

  
    
  
  <div bgcolor="#ffffff"><span class="gmail-">
    On 2018/01/25 13:50, Li Wang wrote:
    <blockquote type="cite">
      
      <div dir="ltr">
        <div style="font-family:monospace,monospace"><br>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Mon, Jan 22, 2018 at 10:19 PM,
            Cyril Hrubis <span dir="ltr"><<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</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">
              <div>​...<br>
              </div>
              <br>
              -       return tv.tv_sec * 1000 + tv.tv_usec / 1000;<br>
              +       return tst_timespec_to_ms(ts);<br>
            </blockquote>
            <div><br>
              <br>
              <div>​Both patches(include the
                old-lib one) looks good.<br>
                <br>
              </div>
              <div>I just have a small
                question about function tst_timespec_to_ms(), why the
                t.tv_nsec plus 500000 when convert to msec?<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    </span><pre>Hi Li,

It seems to round up/down the decimal produced by converting nesc to msec.
If the decimal is greater than 0.5,  round up it. If not, round down it.</pre></div></blockquote><div><br><div style="font-family:monospace,monospace;display:inline" class="gmail_default">​Ah, yes. Thanks so much!​</div> <br></div></div><br clear="all"><br>-- <br><div class="gmail_signature">Li Wang<br><a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a></div>
</div></div>