Вниз
Скачать: 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.01 c
3-30714
eco
2002-05-18 15:14
2002.06.10
Разработка компонента БД


3-30736
Dorosh
2002-05-17 11:33
2002.06.10
RxMemoryData.Filter


1-30907
Hawk2
2002-05-30 09:34
2002.06.10
Библиотека RxLib, стыдно, но спрошу.


4-31056
новенький в Делфи
2002-04-10 02:22
2002.06.10
Почему не работает?


1-30912
Sniffer
2002-05-28 20:40
2002.06.10
Алгоритм




   Наверх