Methods for caching generic data

This commit is contained in:
Linus Dierheimer
2022-06-20 16:35:15 +02:00
parent 8fa09ca093
commit af0c72aa61
9 changed files with 50 additions and 25 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ static double getGhz(const char* policyFile, const char* cpuFile)
FFstrbuf content;
ffStrbufInit(&content);
ffGetFileBuffer(policyFile, &content);
ffReadFileBuffer(policyFile, &content);
if(content.length == 0)
ffGetFileBuffer(cpuFile, &content);
ffReadFileBuffer(cpuFile, &content);
double herz = ffStrbufToDouble(&content);