Skip to content

cpu_temp returns the error message: "Not supported" on Windows 10 #94

@JonasJore

Description

@JonasJore

Upon running cargo run from terminal the call to system.cpu_temp() returns the error message: Not supported for Windows 10. Even though it says on the crates.io page that there should be support for Windows.

Attached code where i tried to get cpu_temp:

extern crate systemstat;

use std::thread;
use std::time::Duration;
use systemstat::{System, Platform, saturating_sub_bytes};

fn main() {
    let system = System::new();

    match system.cpu_temp() {
        Ok(cpu_temp) => println!("\nCPU temp: {}", cpu_temp),
        Err(ex) => println!("\nCPU temp: {}", ex) 
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions