得到Cpu主频<br>function GetCPUSpeed: Double;<br>const<br> DelayTime = 500;<br>var<br> TimerHi, TimerLo: DWORD;<br> PriorityClass, Priority: Integer;<br>begin<br>try<br> PriorityClass := GetPriorityClass(GetCurrentProcess);<br> Priority := GetThreadPriority(GetCurrentThread);<br> SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);<br> SetThreadPriority(GetCurrentThread,THREAD_PRIORITY_TIME_CRITICAL);<br> Sleep(10);<br> asm<br> dw 310Fh // rdtsc<br> mov TimerLo, eax<br> mov TimerHi, edx<br> end;<br> Sleep(DelayTime);<br> asm<br> dw 310Fh // rdtsc<br> sub eax, TimerLo<br> sbb edx, TimerHi<br> mov TimerLo, eax<br> mov TimerHi, edx<br> end;<br> SetThreadPriority(GetCurrentThread, Priority);<br> SetPriorityClass(GetCurrentProcess, PriorityClass);<br> Result := TimerLo / (1000.0 * DelayTime);<br> except<br> Result := 0;<br> end;<br>end; <br>CPU温度要在BIOS中才能读出来,而且这东西每块主板都不一样,肯定无法实现通用程序,<br>至于如何读,需要主板厂家给你提供接口吧?否则你怎么知道Bios中哪个值是温度啊?<br>风扇转数就是神仙也得不出来的,哈哈<br>