processor speed 
Author Message
 processor speed

Is there a function that will obtain the system processor speed?  Any
information is greatly appreciated!  Please email to

Thanks!
Mike



Sun, 02 Feb 2003 03:00:00 GMT  
 processor speed

Hi..

        You can query its value from the DWORD at "~MHz" in

        HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0

        registry key.

Cheers
Check Abdoul
--------------------


Quote:
> Is there a function that will obtain the system processor speed?  Any
> information is greatly appreciated!  Please email to

> Thanks!
> Mike



Sun, 02 Feb 2003 03:00:00 GMT  
 processor speed

Beware that that information is (I believe) only available in NT/Win2K.
Win9x does not store that information.

If you have a processor that supports RDTSC you can calculate the
processor speed with something like this pseudocode:

double ClockTime = GetTheTime();
__int64 ticks = rdtsc;
Sleep(100);
double ElapsedTime = GetTheTime() - ClockTime;
__int64 elapsedticks = rdtsc - ticks;

double Mhz = elapsedticks / ElapsedTime;

GetTheTime() needs to use an OS function (getTickCount() or some
such) to return wall clock time. rdtsc is the CPU instruction.
Changing the pseudo code into real code is "left as an exercise
for the reader".

I found this produce results accurate to three or four decimal places.
If you want to be careful, run the test several times and take the
median.

Quote:

> Hi..

>         You can query its value from the DWORD at "~MHz" in

>         HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0

>         registry key.

> Cheers
> Check Abdoul
> --------------------



> > Is there a function that will obtain the system processor speed?  Any
> > information is greatly appreciated!  Please email to

> > Thanks!
> > Mike

--
.Bruce Dawson, Humongous Entertainment.
http://www.humongous.com/


Mon, 03 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. To GET Processor Speed, OS , Memory in C#....?

2. How can I determine the processor speed

3. processor speed

4. Finding Processor Speed

5. Detecting Processor Speed.

6. Any API can get processor speed?

7. Processor Speed or FAQ

8. Processor Speed

9. Processor Speeds

10. Revealing Processor speed using MFC

11. PROCESSOR SPEED IN Windows 95 ???

12. How to get Processor Speed, Memory, OS name in C#?

 

 
Powered by phpBB® Forum Software