Refactored read methods

This commit is contained in:
Linus Dierheimer
2022-06-20 16:27:33 +02:00
parent 6e731c80d0
commit 8fa09ca093
12 changed files with 53 additions and 39 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ static double getGhz(const char* policyFile, const char* cpuFile)
FFstrbuf content;
ffStrbufInit(&content);
ffGetFileContent(policyFile, &content);
ffGetFileBuffer(policyFile, &content);
if(content.length == 0)
ffGetFileContent(cpuFile, &content);
ffGetFileBuffer(cpuFile, &content);
double herz = ffStrbufToDouble(&content);