获得CPU速度的Delphi 函数

这个有意思,虽然是个老程序了,对于3Ghz的CPU算的还是很准的envy


function TscSystemInfo.GetCPUSpeed : Double;
const
IntDelayTime = 500; // time in ms
var
TimerHi, TimerLo: DWORD;
IntPriorityClass, IntPriority: Integer;
begin
IntPriorityClass := GetPriorityClass(GetCurrentProcess);
IntPriority := 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(IntDelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;

SetThreadPriority(GetCurrentThread, IntPriority);
SetPriorityClass(GetCurrentProcess, IntPriorityClass);

Result := TimerLo / (1000.0 * IntDelayTime);
end;

2006户外运动夏令营照片-昆明山溪谷户外运动有限公司

这里有几张2006年昆明山溪谷户外运动有限公司组织户外运动夏令营的照片自己搭帐篷,户外运动夏令营肯定是露营了无具野炊定向越野今年新增加了利用专业器材“爬树”,这个项目很有趣,城里长大的孩子没爬过树吧,回忆我们小时候什么树没爬过,呵呵。

做一下广告:
24小时咨询热线:0871- 8317199、13577063557  
戚老师报名地址: 昆明市五华区国防路155号(奔迅假日户外用品店内)

昆明山溪谷户外运动有限公司组织户外运动夏令营

昆明山溪谷户外运动有限公司组织今年的户外运动夏令营从下个月开始,共有四期,每期六天。地点:石林长湖风景区24小时咨询热线:0871-8317199、13577063557  戚老师报名地址: 昆明市五华区国防路155号(奔迅假日户外用品店内)

最近工作安排很满

手上要做的事太多,两个软件要升级,用户已经在催着了,Polish语言文件都已经发过来了。还有一个比较大的项目,进度还可以,就是时间老觉得不够。强生干式生化仪中文报告软件本月卖出一套,用户也提了一些要求,不是太急,下个月再解决吧。户外旅游等这个月把这些事情做完再考虑。