From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a447112bc8b81379 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!news.m-online.net!newsfeed.stueberl.de!npeer.de.kpn-eurorings.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada, games and frame rate calculation Date: 17 Feb 2005 22:08:51 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1108678202 10176 62.49.19.209 (17 Feb 2005 22:10:02 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 17 Feb 2005 22:10:02 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:8393 Date: 2005-02-17T22:08:51+00:00 List-Id: tmoran@acm.org writes: > > 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. > You may want to look up "Time the Clock" on AdaPower. The Booch Components (http://www.pushface.org/components/bc/) contain an i86 high-res clock. On i86 the resolution is the timestamp counter, ie basically the clock rate; I have a PowerPC implementation (but I don't own the copyright), using the timebase, which has a coarser resolution -- but 40 ns ain't bad! -- Simon Wright 100% Ada, no bugs.