cpu用法如何检查我以前的pc CPU使用情况 [英] cpu usage how can i check my pc cpu usage for previous time

查看:102
本文介绍了cpu用法如何检查我以前的pc CPU使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能检查上一次的pc cpu使用情况

解决方案

你不能。



当你知道将来需要它时你需要读一个读数并将它存储在一个变量中。



我曾经做过以下事情,像魅力一样工作:

每隔很多秒就将CPU使用率读入数组。也许只有2个变量可能适合你。

然后,每隔这么多秒钟我拉下我的读数,所以最新的读数将占据阵列的第一位。



我用System.Windows.Forms库中的Timerthread做到了这一点(小心,因为System.Threading中有另一个Timer类,我不是它的粉丝

how can i check my pc cpu usage for previous time

解决方案

You can't.

You'll need to take a reading whenever you know you'll need it in the future and store it in a variable.

I once did the following and worked like a charm:
Took readings of CPU usage into an array every so many seconds. Maybe just 2 variables may work for you.
Then, as well, every so many seconds I "pulled down" my readings so the newest reading would take the first place in the array.

I did that with Timer "thread" from System.Windows.Forms library (be careful, cause there is another Timer class in System.Threading -of which I'm not a fan.


这篇关于cpu用法如何检查我以前的pc CPU使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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