Categorized | Kuli-Ah

Mengetahui Kecepatan Prosesor (Delphi)

Ok, sebelum kita mulai nyalakan dulu program tutorialnya….

reading DVD……

function TForm1.GetCpuSpeed: Extended;
var
t: DWORD;
mhi, mlo, nhi, nlo: DWORD;
t0, t1, chi, clo, shr32: Comp;
begin
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 := (t1 – t0) / 1E6;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin

//menampilkan  kecepatan prosesor
Label1.Caption := FloatToStr(GetCpuSpeed) + ‘ MHz’;
end;

Popularity: 6% [?]

  • Share/Bookmark

Leave a Reply

[+] kaskus emoticons
:D :) ^_^ :( :o 8O :shock: 8) ;-( :lol: xD :wink: :evil: :p :whistle: :woot: :sleep: =] :sick: :straight: :ninja: :love: :kiss: :angel: :bandit: :alien:

Translator

Indonesian flagChinese (Simplified) flagEnglish flagGerman flagJapanese flagDutch flag                                    
By N2H

tinggalkan jejakmu..

Name :
Web URL :
Message :
:) :( :D :p :(( :)) :x

Roy Tanck's Flickr Widget requires Flash Player 9 or better.

Get this widget at roytanck.com