From 77c6a9a666b87f8b2936bf6740ef1c89ac17829a Mon Sep 17 00:00:00 2001 From: Xorg Date: Tue, 30 Aug 2016 11:11:36 +0200 Subject: [PATCH] Increase CPU clock accuracy in bus clock calculation The CPU clock is computed once and cached, so it needs to be accurate. In libcpuid.h, 100ms is recommended. --- libcpuid/rdmsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c index 959885e..f2356b0 100644 --- a/libcpuid/rdmsr.c +++ b/libcpuid/rdmsr.c @@ -832,7 +832,7 @@ static double get_info_bus_clock(struct msr_driver_t* handle, struct cpu_id_t *i uint64_t reg; if(clock == 0) - clock = cpu_clock_measure(50, 1); + clock = cpu_clock_measure(100, 1); if(id->vendor == VENDOR_INTEL) { /* Refer links above