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!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: Ada, games and frame rate calculation Date: Fri, 18 Feb 2005 09:19:04 +0000 Message-ID: <1324498.BkVMu04s3V@jellix.jlfencey.com> References: <%jaRd.2654$kU3.625@newsread1.news.pas.earthlink.net> <4215af8e$0$23954$ba620e4c@news.skynet.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net 9F7iV6qe3NpJ9/jxXSRz3QslqYSlIy8aUtM4FNX9dYpvZJ/swr X-Phone: +41 62 961 13 52 X-Mood: Desillusioned. Xref: g2news1.google.com comp.lang.ada:8412 Date: 2005-02-18T09:19:04+00:00 List-Id: 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.