Article View: comp.sys.ibm.pc.misc
Article #12070Re: clockspeed
From: Kris Heidenstrom
Date: Sun, 26 Nov 1995 00:00
Date: Sun, 26 Nov 1995 00:00
20 lines
1840 bytes
1840 bytes
In article <498bs7$e88@tzlink.j51.com>, David Grossberg <mouse@j51.com> wrote: > Does anyone know how to check the clockspeed of a PC. I'm writing an > arcade style action game which needs to run at a consistent speed on > any PC or clone. I simpy need to check the clock speed of the computer > at the start of the program and insert an appropriate delay in the > main loop. I'm using Borland Turbo C++. That's a very bad way to try to make your program speed independent of processor speed! There are several better ways, using the timer which is clocked at a fixed speed regardless of the CPU clock rate. You can find details in my timing FAQ, available via FTP from SimTel and its mirror sites (e.g. oak.oakland.edu, ftp.gate.net) in the /SimTel/msdos/info directory, file name pctim002.zip. Good luck! Kris -- Kris Heidenstrom kheidens@actrix.gen.nz Wellington, New Zealand "Minister can I just begin by asking why, with manufacturing output down and Sterling showing a steep decline on world markets, are you wearing a giant rabbit costume?" -- Interview, Alexei Sayle's Stuff
Technical Details
Message-ID:
<DIMpBC.6M8@actrix.gen.nz>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<498bs7$e88@tzlink.j51.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d683,ed116bf9454357c7,start X-Google-Attributes: gid10d683,public X-Google-Thread: f53ba,ed116bf9454357c7,start X-Google-Attributes: gidf53ba,public X-Google-Thread: 108f8e,ed116bf9454357c7,start X-Google-Attributes: gid108f8e,public From: kheidens@atlantis.actrix.gen.nz (Kris Heidenstrom) Subject: Re: clockspeed Date: 1995/11/26 Message-ID: <DIMpBC.6M8@actrix.gen.nz> X-Deja-AN: 120087152 x-nntp-posting-host: atlantis.actrix.gen.nz sender: news@actrix.gen.nz (News Administrator) references: <498bs7$e88@tzlink.j51.com> organization: Actrix - Internet Services newsgroups: comp.sys.ibm.pc.misc,comp.sys.ibm.pc.games.action,aus.computers.ibm-pc