How to get a CPU speed using a Windows API

How to get a CPU speed using a Windows API
I'm interested in MHZ value, NOT in processor type (386, 486, Pentium etc.)
tbbrhunAsked:
Who is Participating?
 
abelConnect With a Mentor Commented:
I have a DLL of Intel (from the program CPUINFO) which does the trick. You only have to call the function in that DLL to get extended processor information. The function for the processor speed is very accurate (but of course uses a loop since you can't find that info on the chip itself...). I have the code for you in C and I can post that if you want, but it might be easier to download it yourself (full sourcecode, samples executables and dll's in one) at:

http://developer.intel.com/design/perftool/cpuid/

It's very easy to use. Look it up, try the executable coming with it if it fits your needs and try calling the dll's. The full documentation of the functions in the dll's is in the package as well. Don't bother about having to ship yet another dll with your app, it's only 20kb. And if you would want to incorporate it in your executable you can use the accompanying source code (be warned: assembler and C!).

Hope this helps you out.

Regards, Abel
0
 
anthonycCommented:
Processor Speed (MHZ) or CPU Make (486, Pentium, Etc?)

I can get the CPU mae for you but I am not sure the MHZ is possible
0
 
tbbrhunAuthor Commented:
Edited text of question
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
VerolandCommented:
Write a benchmark app.
0
 
tbbrhunAuthor Commented:
no comments, just THANKS A LOT, ABEL
0
 
MirkwoodCommented:
Bought This Question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.