Change 12059 by jhi@alpha on 2001/09/17 20:07:20

        Explain an apparent bug reported by
        Richard J. Barbalace <[EMAIL PROTECTED]>,
        with additional explanation from Gisle Aas.

Affected files ...

... //depot/perl/ext/Time/HiRes/HiRes.pm#6 edit

Differences ...

==== //depot/perl/ext/Time/HiRes/HiRes.pm#6 (text) ====
Index: perl/ext/Time/HiRes/HiRes.pm
--- perl/ext/Time/HiRes/HiRes.pm.~1~    Mon Sep 17 14:15:05 2001
+++ perl/ext/Time/HiRes/HiRes.pm        Mon Sep 17 14:15:05 2001
@@ -127,6 +127,19 @@
 resulting in a nice drop-in replacement for the C<time> provided with perl,
 see the EXAMPLES below.
 
+B<NOTE>: Since Sunday, September 9th, 2001 at 01:46:40 AM GMT the
+default floating point format of Perl and the seconds since epoch
+have conspired to produce an apparent bug: if you print the value
+of Time::HiRes::time() you seem to be getting only five decimals,
+not six as promised (microseconds).  Not to worry, the microseconds
+are there (assuming your platform supports such granularity).
+What is going on is that the default floating point format of Perl
+only outputs 15 digits.  In this case that means ten digits before the
+decimal separator and five after.  To see the microseconds you can use
+either printf/sprintf with C<%.6f>, or the gettimeofday() function in
+list context, which will give you the seconds and microseconds as two
+separate values.
+
 =item sleep ( $floating_seconds )
 
 Converts $floating_seconds to microseconds and issues a usleep for the 
End of Patch.

Reply via email to