Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: The most precise second (timer)

by duelafn (Vicar)
on Nov 27, 2019 at 10:24 UTC ( #11109301=note: print w/replies, xml ) Need Help??


in reply to Re^2: The most precise second (timer)
in thread The most precise second (timer)

You miss the point of this test. Anonymous Monk's point is not to suggest calling out to an external perl. The point is that sleep() itself has inherently imprecise. You requested sleep(1) but actually got 1.000147 seconds of sleep. Therefore fussing over 0.00000XXXX seconds of "error" is futile.

Good Day,
    Dean

Replies are listed 'Best First'.
Re^4: The most precise second (timer)
by haukex (Bishop) on Nov 27, 2019 at 11:49 UTC
    Therefore fussing over 0.00000XXXX seconds of "error" is futile.

    Yes, but the error is cumulative: 1.000147 seconds of sleep over one day amounts to an error of about 12 seconds, which might be worth fussing over...

      The error is not cumulative in the OP code nor most of the suggestions.

      Good Day,
          Dean

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2021-03-01 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (15 votes). Check out past polls.

    Notices?