I misunderstood your arcane way of doing floating point math
Arcane? I've two time points, both given as a number of seconds and a number of microseconds since some point in time. Let the first timestamp be (S1, M1), the second (S2, M2). So, the difference is (S2 + M2 / 1000000) - (S1 + M1 / 1000000). Factoring out common code is good is always thought here, and it has the additional benefits of reducing the number of divisions needed, so using some primary school arithmetic, we get S2 - S1 + (M2 - M1) / 1000000.

Not arcane. Elementary.

I also noted "Without having analysed it too closely, you appear to have a precedence problem in your delta calculations.".
If you are going to critic my posting publicly, I think I deserve the curtesy of you at least analysing some simple arithmetic a bit more closely.

In reply to Re^6: &1 is no faster than %2 when checking for oddness. (Careful what you benchmark) by Anonymous Monk
in thread &1 is no faster than %2 when checking for oddness. Oh well. by diotalevi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.