mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-26 08:20:38 +01:00
[v1.05] Experimental max frequency measurement (x86 only)
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include "../common/freq.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -960,6 +964,13 @@ struct frequency* get_frequency_info(struct cpuInfo* cpu) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
if (freq->max == UNKNOWN_DATA) {
|
||||
printWarn("All previous methods failed, measuring CPU frequency");
|
||||
freq->max = measure_max_frequency();
|
||||
}
|
||||
#endif
|
||||
|
||||
return freq;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user