From d14e0fe3a08dfcb1dd70c618e4bb742dc46b965d Mon Sep 17 00:00:00 2001 From: David Venhoff Date: Thu, 4 Sep 2025 18:32:58 +0200 Subject: [PATCH] Calculate the bus frequency at runtime The 100mHz value was guaranteed by intel for this CPU, but this approach is more reliable --- pt-dump-decoder/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pt-dump-decoder/src/lib.rs b/pt-dump-decoder/src/lib.rs index 6d2c493..d99375f 100644 --- a/pt-dump-decoder/src/lib.rs +++ b/pt-dump-decoder/src/lib.rs @@ -6,7 +6,7 @@ use std::error::Error; use std::fs::File; use std::path::Path; use std::time::Duration; -use raw_cpuid::CpuId; +use raw_cpuid::{cpuid, CpuId}; #[derive(Debug)] pub struct AnalyzeData { @@ -38,8 +38,9 @@ pub fn analyze_dump(path: impl AsRef) -> Result;