Solved

Getting CPU speed

Posted on 2000-03-14
7
212 Views
Last Modified: 2013-12-04
Is there a standard API for retrieving the machine CPU speed ?
I know the info is in the registry:
HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

I'm curious if there is a stanard way to get it.

thanks,
Avi.


0
Comment
Question by:kavas
  • 3
  • 3
7 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 2617136
0
 

Author Comment

by:kavas
ID: 2617272
Sorry,
Looking for a standard API call, not a library.
If you were wondering, I'm comparing API's of a few OS as a part of my research.

thanks,
Avi.
0
 
LVL 1

Expert Comment

by:ntdragon
ID: 2617349
you mean in by programring

try c++builder there are some system components that will get it for you

or if you want it for dos as well take a comp that you know it's speed then make a loop and check how much time did it take for the comp to pass the loop then you can do it on any comp and colculate the comp speed
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:kavas
ID: 2617496
1. I'm working with VC++ 6.0
2. Still looking for a WIN32 call.
3. Why not using HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

Avi.


0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 2617578
>Is there a standard API for retrieving the machine CPU speed ?

There is no Win32 API function to do what you want. The closest is the GetSystemInfo function.
0
 

Author Comment

by:kavas
ID: 2617615
Do you know when: HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

is calculated and how accurate it is ?
0
 
LVL 23

Expert Comment

by:chensu
ID: 2618096
I think that registry value is written when Windows is installed or there is any change to the CPU. The value is not 100% accurate.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question