Вниз
Скачать: CL | DM;

processor frequency   Найти похожие ветки 

← →
CrazyTemo   (2002-04-09 10:33) [0]

есть ли такая функция которая возврашает частату процесора

сбасибо


← →
handra ©   (2002-04-09 10:53) [1]

function GetCPUSpeed : Double;
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
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;

SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);

Result := TimerLo / (1000 * DelayTime);
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.008 c
14-30992
Чужой
2002-04-22 11:27
2002.06.10
Значения в .INI файлах


8-30927
KJan
2001-12-30 20:34
2002.06.10
Saving


1-30853
Ascan
2002-05-28 18:40
2002.06.10
Отключить оптимизацию кода в Delphi


6-30941
Renton
2002-03-16 20:41
2002.06.10
Запрет/Разрешение на Интернет


3-30681
Genry
2002-05-17 12:30
2002.06.10
Двойной lookup




   Наверх