Вниз
Скачать: 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
1-30800
IIS
2002-05-31 10:57
2002.06.10
Регистрация COM


1-30846
ded_di
2002-05-28 17:24
2002.06.10
Image в TChart


14-30985
SPeller
2002-05-05 16:50
2002.06.10
ВНИМАНИЕ !!! Обнаружена ошибка в модуле Windows !!!


6-30951
vilka
2002-03-31 14:50
2002.06.10
Как определить IP по URL


7-31025
AShep
2002-03-18 01:58
2002.06.10
5 вольт на LPT/COM порте




   Наверх