亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何獲得CPU溫度?

如何獲得CPU溫度?

長風秋雁 2019-11-11 15:02:37
我需要為正在開發的應用程序收集一些系統信息。使用C??梢暂p松獲得可用內存和CPU負載。不幸的是,CPU溫度并不是那么容易。我嘗試使用WMI,但無法使用任何東西Win32_TemperatureProbe要么MSAcpi_ThermalZoneTemperature有沒有人處理過這個問題?我想知道像SiSoftware Sandra這樣的監視程序如何獲得該信息...以防萬一有人感興趣,下面是該類的代碼:public class SystemInformation{    private System.Diagnostics.PerformanceCounter m_memoryCounter;    private System.Diagnostics.PerformanceCounter m_CPUCounter;    public SystemInformation()    {        m_memoryCounter = new System.Diagnostics.PerformanceCounter();        m_memoryCounter.CategoryName = "Memory";        m_memoryCounter.CounterName = "Available MBytes";        m_CPUCounter = new System.Diagnostics.PerformanceCounter();        m_CPUCounter.CategoryName = "Processor";        m_CPUCounter.CounterName = "% Processor Time";        m_CPUCounter.InstanceName = "_Total";     }    public float GetAvailableMemory()    {        return m_memoryCounter.NextValue();    }    public float GetCPULoad()    {        return m_CPUCounter.NextValue();    }    public float GetCPUTemperature()    {        //...        return 0;    }}
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 612 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號