comp.lang.ada
 help / color / mirror / Atom feed
From: Vinzent 'Gadget' Hoefler <nntp-2005-02@t-domaingrabbing.de>
Subject: Re: Ada, games and frame rate calculation
Date: Fri, 18 Feb 2005 09:19:04 +0000
Date: 2005-02-18T09:19:04+00:00	[thread overview]
Message-ID: <1324498.BkVMu04s3V@jellix.jlfencey.com> (raw)
In-Reply-To: 4215af8e$0$23954$ba620e4c@news.skynet.be

Adrien Plisson wrote:

> i just tested: on my 3GHz pentium, QueryPerformanceFrequency returns
> 2.99 GHz, which should make a counter resolution of 0.33 nanosecond.
> well, the problem is that MS does not give any indication of the
> precision of the counter. does it really count each clock tick

Yes, on modern x86 (Pentium and above) which have the RDTSC (Read Time
Stamp Counter) instruction it does. On older ones it probably uses the
timer ticks (which - in theory - should give a resolution of something
around one microsecond), but I don't know for sure.

Well, because we're talking about game programming it might be a valid
assumption that the usual gamer owns an up to date machine... ;-)


Vinzent.

-- 
worst case: The wrong assumption there actually is one.



      reply	other threads:[~2005-02-18  9:19 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
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 [this message]
replies disabled

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