heim_cpu/os/linux/
freq.rs

1
2
3
4
5
6
7
8
9
10
11
12
use heim_common::prelude::*;

use crate::{sys, CpuFrequency};

/// Returns stream of per-[CPU frequencies] information.
///
/// Order of the stream is constant.
///
/// [CPU frequencies]: ../../struct.CpuFrequency.html
pub fn frequencies() -> impl Stream<Item = Result<CpuFrequency>> {
    sys::frequencies().map_ok(Into::into)
}