win32 api函数获取处理器的当前速度 [英] win32 api function to get processor's current speed

查看:131
本文介绍了win32 api函数获取处理器的当前速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道用于查询本地PC处理器当前速度的win32 api函数。我不希望使用WMI,因为它似乎不可能在所有PC上都是可行的。

I am unaware of a win32 api function/functions used to query the local PC processor's current speed. I wish not to use WMI because it seems unlikely to be feasible on all PCs.

推荐答案

您可以(通常)获得处理器使用 QueryPerformanceFrequency 函数。我说通常是因为该函数返回系统性能计时器组件的频率,但是实际上当前所有CPU的可用频率都与性能计时器组件相同。

You can (usually) get the processor speed using the QueryPerformanceFrequency function. I'm saying "usually" since this function returns the frequency of the performance timer component of the system, but virtually all current CPU's available operate at the same frequency as the performance timer component.

此功能自Windows 2000开始可用,因此很有可能在当今的大多数PC上都受支持。

This function is available since Windows 2000, so chances are good that it's supported on most of todays PCs.

这篇关于win32 api函数获取处理器的当前速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆