Use timer_getCycleClock in likwidMetric

This commit is contained in:
Thomas Gruber 2025-04-03 12:28:12 +02:00 committed by GitHub
parent c1395ec2ed
commit 8daa3701b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}