Вниз
Скачать: 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
3-30703
KOA
2002-05-18 12:33
2002.06.10
Убрать удаление записей в базе


8-30916
X-Boris
2002-01-21 20:33
2002.06.10
Амплитуда звука и VediaPlayer


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


1-30906
alkmas
2002-05-30 09:59
2002.06.10
Создание BPL


1-30772
QWest
2002-05-30 16:55
2002.06.10
Очень простенький вопрос...




   Наверх