Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: converting Time::HiRes

by poulhs (Beadle)
on Oct 04, 2012 at 14:30 UTC ( [id://997240]=note: print w/replies, xml ) Need Help??


in reply to Re: converting Time::HiRes
in thread converting Time::HiRes

This is the wrong way to handle $ms !!

It will fail unless there are 6 significant digits!

$err = ( $ms < 100000 ? 'wrong' : '' ); printf "Seconds since epoch (float): %.6f\n", $sec; # $sec is a float, print it like that... printf "Seconds since epoch (list): %d.%d $err\n", $s, $ms; printf "Seconds since epoch (float): %.6f $err\n", $float_t;
Seconds since epocg (float): 1349360875.006262 Seconds since epoch (list): 1349360875.6267 wrong Seconds since epoch (float): 1349360875.626700 wrong

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://997240]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-19 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found