comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Ada, games and frame rate calculation
Date: Fri, 18 Feb 2005 00:06:19 GMT
Date: 2005-02-18T00:06:19+00:00	[thread overview]
Message-ID: <%jaRd.2654$kU3.625@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <gfOdncOYaIngn4nfRVn-ig@comcast.com>

tmoran@acm.org wrote:

>>GNAT, IIRC, has an accuracy of 1 ns, so 0.0333 is going to be a lot
> 
>   Type Duration has a small 'small, but the Windows Performance Counter
> only ticks (approximately) every 1/nth of a microsecond, where n = 3 on
> the machine I'm using now.  So two successive clock reads, if they don't
> give the same value, will differ at least by 300 or so nanoseconds.

Right. I was talking about the accuracy of the representation, not the 
precision of the clock.

How does one read the HW clocks under Windows? I've heard that there is 
quantum randomness in the circuits that divide the oscillator to create 
the different clocks. Using a slower clock to decide when to read a 
faster clock, and keeping the LS bit of the faster clock's reading, 
results in a truly random string of bits. I'd like to play with it, but 
have yet to find anything on how it's done.

If it works well, I'd make it available under the GMGPL.

-- 
Jeff Carter
"Help! Help! I'm being repressed!"
Monty Python & the Holy Grail
67



  parent reply	other threads:[~2005-02-18  0:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-16 21:32 Ada, games and frame rate calculation Luke A. Guest
2005-02-16 22:16 ` Stephen Leake
2005-02-16 23:03   ` Luke A. Guest
2005-02-17  0:55     ` Stephen Leake
2005-02-17  2:33       ` tmoran
2005-02-17  8:39       ` Dmitry A. Kazakov
2005-02-17 23:23     ` Randy Brukardt
2005-02-19 14:48       ` Simon Wright
2005-02-17  0:06   ` Jeffrey Carter
2005-02-17  2:33     ` tmoran
2005-02-17 22:08       ` Simon Wright
2005-02-18  0:06       ` Jeffrey Carter [this message]
2005-02-18  5:30         ` tmoran
2005-02-19  0:03           ` Jeffrey Carter
2005-02-19  0:45             ` tmoran
2005-02-19 22:19               ` Jeffrey Carter
2005-02-18  9:04         ` Adrien Plisson
2005-02-18  9:19           ` Vinzent 'Gadget' Hoefler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox