Excellent description. Just out of curiosity, I tried your second example on my idle system (linux, newer AMD quad). It used <2% cpu and showed 2-3 *microsecond* precision:

1279058169.099145 1279058169.599145 1279058170.099145 1279058170.599144 1279058171.099144 1279058171.599144 1279058172.099146 1279058172.599144 1279058173.099145 1279058173.599144 1279058174.099145 1279058174.599146 1279058175.099144 1279058175.599145 1279058176.099146 1279058176.599145 1279058177.099145 1279058177.599144

Then I started two fsck processes and 4 prime number searching threads which overtax all CPUs and FPUs. I got this:

1279057824.4011 1279057824.9012 1279057825.4012 1279057825.9011 1279057826.4012 1279057826.9012 1279057827.4012 1279057827.9012 1279057828.4011 1279057828.9011 1279057829.4012 1279057829.9011 1279057830.4012 1279057830.9012 1279057831.4030 1279057831.9012

Which still looks like 1-2 millisecond precision. This is of course much better than I need. I don't know how valid those tests are, though, so I'll have to read up on the linux kernel schedulers.

Any tips for code to do the actual writing? I'll probably use the autoflush=1 example posted in the thread.


In reply to Re^2: Any ideas for using perl as a simple pulse generator? by bfreemer
in thread Any ideas for using perl as a simple pulse generator? by bfreemer

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.