Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/lib/src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ fn get_model_name() -> Option<String> {
let base = extract_name(data)?;
let mut name = base;
if let Some(mhz) = get_cpu_freq_mhz() {
if let Some(at) = name.find(" @ ") {
name.truncate(at);
}

name.push_str(" @ ");
// Round to nearest 0.01 GHz, then split so carries (e.g. 1999 MHz)
// roll into the integer part instead of overflowing the fraction.
Expand Down
Loading