discussion forum



message

Name: unknown
Date: September 30, 2003 at 15:51:36
Subject: Re: Question about RDTSC programming
In Reply To: Question about RDTSC programming by
Jag on September 30, 2003 at 15:08:16
Text: To calculate the CPU speed you need to use the 8254 timer (ports 40h-43h)
It has a resolution of 838ns and is the same on all PCs and has been so
since the original IBM PC. Depending on what you're doing you might want
to just use the 8254 timer in your game engine.

The link points to Intel's CPUID document which includes code to calculate
the CPU speed. Getting the bus speed and multiplier involves reading MSRs
and is different between processor families. You shouldn't really need that
info anyway in a game engine.

optional link: ftp://download.intel.com/design/Xeon/applnots/24161823.pdf



post a followup message
(Be nice... or be blocked. Be technical... or be erased.)

Name: optional link title:
eMail: optional link URL:
Subject: optional image URL:
  Insert line breaks by hand when only about one inch remains at the right side. Otherwise your message will be unreadable.
Text:
 

  Note: The above eMail form fields may look unaligned if you are using a browser other than Netscape Navigator version 3.0.



currently posted followup messages
(You may have to press the RELOAD button of your browser.)




main page