From 8daa3701b98c02eb01c58ba85b6f62b94f432c76 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Thu, 3 Apr 2025 12:28:12 +0200 Subject: [PATCH] Use timer_getCycleClock in likwidMetric --- collectors/likwidMetric.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/collectors/likwidMetric.go b/collectors/likwidMetric.go index 797b324..8434e4b 100644 --- a/collectors/likwidMetric.go +++ b/collectors/likwidMetric.go @@ -190,12 +190,8 @@ func getBaseFreq() float64 { } if math.IsNaN(freq) { - C.power_init(0) - info := C.get_powerInfo() - if float64(info.baseFrequency) != 0 { - freq = float64(info.baseFrequency) - } - C.power_finalize() + C.timer_init() + freq = float64(C.timer_getCycleClock()) / 1e3 } return freq * 1e3 }