Solved

Getting CPU speed

Posted on 2000-03-14
7
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

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.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

707 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