aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPA4WDH2024-07-28 10:59:22 +0200
committerPA4WDH2024-07-28 10:59:22 +0200
commit56c6991c78e822086ac71932f0215e9deb1121ed (patch)
treec4c0c246be4e5a851fc9fd32a908872669b41f48
parentFix more typos (diff)
downloadcputemp2maxfreq-56c6991c78e822086ac71932f0215e9deb1121ed.tar.gz
cputemp2maxfreq-56c6991c78e822086ac71932f0215e9deb1121ed.tar.bz2
cputemp2maxfreq-56c6991c78e822086ac71932f0215e9deb1121ed.zip
FLush after writes to CSV file
-rw-r--r--logger.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/logger.c b/logger.c
index 315c8c2..6b8c10b 100644
--- a/logger.c
+++ b/logger.c
@@ -107,6 +107,7 @@ void csvlog_init()
"\"CPU Temperature\","
"\"Target Temperature\","
"\"Scaling maximum frequency\"\n",config.csvfile);
+ fflush(config.csvfile);
} else {
DEBUG1_LOG("Appending to CSV file\n");
config.csvfile=fopen(config.csvlog,"a");
@@ -134,6 +135,7 @@ void csvlog_write()
}
fprintf(config.csvfile,"%s,\"%ld\",\"%ld\",\"%ld\",\"%ld\",\"%ld\",\"%ld\"\n",timestring,cpudata.min_freq,cpudata.max_freq,cpudata.cur_freq,cpudata.cur_temp/1000,config.max_temp/1000,cpudata.scale_max);
+ fflush(config.csvfile);
}
// Close the CSV file