[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Processor Speed

Posted on 1998-01-28
6
Medium Priority
?
266 Views
Last Modified: 2010-04-04
Can anyone tell me  how to detect the type of CPU in a machine and its speed?  Say, a Pentium running at 166 mhz?

Thanks

Stu
0
Comment
Question by:SJohnson
[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
6 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1357795
The "GetSystemInfo" api call will return the type of CPU (486, Pentium, etc.) but not the speed...

JB
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1357796
Thanks for that.  I actually found that just after posting this.  But I still need to find the speed.

Again, thanks.

Stuart
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1357797
I don't think Delphi declares all the constants for GetSystemInfo, but they are declared in Winnt.h if you have VC++.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Expert Comment

by:buemoh
ID: 1357798
GetSystemInfo can not detect the CPU-speed, but you can read the BIOS, because all newer BIOS store the CPU-speed.
NOTICE: to read BIOS-information you've to change the memory-address (under 640KByte) to selectors, which only can be used in WIN95 or WINNT.

Some years ago I wrote a small programn which does this. May be I find it.
0
 

Accepted Solution

by:
kwang080897 earned 400 total points
ID: 1357799
Not long ago, I was looking for the same thing, and found the answer right here on Experts Exchange(Good Place)

I Dont know how this works, but i works thanks to someone on Experts Exchange (dont remember who).

A good advise :

Check some of the previos answered questionon this side:
There is a lot of good stuff (Cheap)



function tmainform.GetCPUSpeed: String;
var
  t: DWORD;
  mhi, mlo, nhi, nlo: DWORD;
  t0, t1, chi, clo, shr32: Comp;
begin
  try
    shr32 := 65536;
    shr32 := shr32 * 65536;

    t := GetTickCount;
    while t = GetTickCount do begin end;
    asm
      DB 0FH
      DB 031H
      mov mhi,edx
      mov mlo,eax
    end;

    while GetTickCount < (t + 1000) do begin end;
    asm
      DB 0FH
      DB 031H
      mov nhi,edx
      mov nlo,eax
    end;

    chi := mhi; if mhi < 0 then chi := chi + shr32;
    clo := mlo; if mlo < 0 then clo := clo + shr32;

    t0 := chi * shr32 + clo;

    chi := nhi; if nhi < 0 then chi := chi + shr32;
    clo := nlo; if nlo < 0 then clo := clo + shr32;

    t1 := chi * shr32 + clo;

    Result := Format('%.0f MHz', [(t1 - t0) / 1E6])

  except
    Result := 'Ukendt';
  end;
end;
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1357800
Thanks for that kwang.  Worked beautifully.

Again, thanks

Stuart
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

656 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