Re: how to find the microprocessor clock speed of the servers?
- From: "Zam" <zam@xxxxxxxx>
- Date: Tue, 5 Apr 2005 14:36:40 +0300
Hello World,
You may try to build your own DLL with this function.
>From news forum:
-----
function GetCPUSpeed(const DelayTime: Integer=100): Integer;
//const DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority : Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
DW 310Fh // rdtsc
MOV TimerLo, EAX
MOV TimerHi, EDX
end;
Sleep(DelayTime);
asm
DW 310Fh // rdtsc
SUB EAX, TimerLo
SBB EDX, TimerHi
MOV TimerLo, EAX
MOV TimerHi, EDX
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result:=Round(TimerLo/(1000.0 * DelayTime));
end;
-----
With best regards,
"Hayes" <Hayes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D4D91940-7BE6-4D95-A429-FC08C9CA2D2A@xxxxxxxxxxxxxxxx
> could i have the source code for finding the processor clock speed of the
> servers?
>
> "Tom Kaminski [MVP]" wrote:
>
> > "Hayes" <Hayes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:E5045440-0270-43F7-9E8C-C5DFE48E98CB@xxxxxxxxxxxxxxxx
> > > hi,
> > >
> > > i am working on a research project on "dynamic-parallel access for
routing
> > > on the wan/internet"
> > >
> > > in this regard, i have to find the microprocessor clock speed of the
> > > servers. i am searching for whether is there any provision in windows
> > > programming as default . there is default class namely System class.
> > > I need to find out any method to find the microprocessor clock speed.
I
> > have
> > > a hint that it could done by calling a particular windows API.
> >
> > Have a look at PerfHound, it will tell you the "number and speed of
CPUs":
> > http://www.aspfaq.com/PerfHound.asp
> >
> > --
> > Tom Kaminski IIS MVP
> > http://www.microsoft.com/windowsserver2003/community/centers/iis/
> > http://mvp.support.microsoft.com/
> > http://www.iistoolshed.com/ - tools, scripts, and utilities for running
IIS
> >
> >
> >
.
- Prev by Date: Re: how to remember my password using cookie
- Next by Date: RE: strange stawork.cpp error, com+ related?
- Previous by thread: Re: how to remember my password using cookie
- Next by thread: RE: strange stawork.cpp error, com+ related?
- Index(es):