diff options
author | PA4WDH | 2023-05-27 11:20:22 +0200 |
---|---|---|
committer | PA4WDH | 2023-05-27 11:20:22 +0200 |
commit | b80926797863c5a36417eb44a34483bb93610b79 (patch) | |
tree | 1a5026e03db338b86671ffe8d556fb57cb3529f0 /argparse.c | |
parent | Use CPU Transition Latency as checkdelay when setting new scaling_max_freq (diff) | |
download | cputemp2maxfreq-b80926797863c5a36417eb44a34483bb93610b79.tar.gz cputemp2maxfreq-b80926797863c5a36417eb44a34483bb93610b79.tar.bz2 cputemp2maxfreq-b80926797863c5a36417eb44a34483bb93610b79.zip |
Add feature to use unixtime timestamps in logs and CSV
Diffstat (limited to 'argparse.c')
-rw-r--r-- | argparse.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -32,7 +32,9 @@ void printhelp() "-s <step> Step size in Khz when increasing/decreasing CPU speed\n" " Default: %ld\n" "-t <number> Temperature limit\n" - " Default: %ld\n", + " Default: %ld\n" + "-u Use unixtime timestamps in log and CSV outputs\n" + " Default timestamp format is: YYYY-MM-DD HH:MM:SS\n", config.name,config.fallback_freq,config.governor,config.temp_input,config.logger_name, config.interval,config.freq_step,config.max_temp/1000 ); @@ -59,7 +61,7 @@ void argparse(int argc, char **argv) memcpy(&userconfig,&config,sizeof(struct s_config)); // Parse options - while((opt=getopt(argc,argv,"c:C:f:g:hi:l:mp:s:t:"))!=-1) + while((opt=getopt(argc,argv,"c:C:f:g:hi:l:mp:s:t:u"))!=-1) { DEBUG1_ARGPARSE("Argument: %c Value: %s\n",opt,optarg); switch(opt) @@ -99,6 +101,9 @@ void argparse(int argc, char **argv) case 't': userconfig.max_temp=strtoll(optarg,NULL,10)*1000; break; + case 'u': + userconfig.use_unixtime=1; + break; default: printhelp(); exit(1); |