Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Microseconds in Per

by Tanalis (Curate)
on Jun 15, 2005 at 06:59 UTC ( [id://466817]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Microseconds in Per
in thread Microseconds in Per

Interesting.

I've done some quick research into this, and it turns out that while it's possible to obtain a timestamp in Windows to 100-nanosecond accuracy, the value returned is only updated once each timer tick[1], or about once every 16 milliseconds.

It'd seem that that update mechanism is the "magic barrier" you see. Cambridge University offer a solution to this, written in C++ - but whether that'd help you any I don't know :)

1. http://www.cl.cam.ac.uk/users/kw217/useful/win32time.html

Replies are listed 'Best First'.
Re^4: Microseconds in Per
by BrowserUk (Patriarch) on Jun 15, 2005 at 17:32 UTC

    Time::HiRes already has this mechanism built in.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
Re^4: Microseconds in Per
by spurperl (Priest) on Jun 15, 2005 at 10:28 UTC
    This is very interesting, thanks. I had the same problem with Windows' native "high frequency counters" and now I understand better why.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found