Replaced unused timezone parameter of gettimeofday() by NULL

This commit is contained in:
Thomas Schmitt 2016-03-10 20:05:41 +00:00
parent af5e1a14e8
commit 5619e43435
4 changed files with 8 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -2072,9 +2072,8 @@ int Xorriso_execute_option(struct XorrisO *xorriso, char *line, int flag)
char **argv= NULL; char **argv= NULL;
double tdiff; double tdiff;
struct timeval tv; struct timeval tv;
struct timezone tz;
gettimeofday(&tv,&tz); gettimeofday(&tv, NULL);
Xorriso_reset_counters(xorriso,0); Xorriso_reset_counters(xorriso,0);
xorriso->idle_time= 0.0; xorriso->idle_time= 0.0;
tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec); tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec);
@ -2091,7 +2090,7 @@ int Xorriso_execute_option(struct XorrisO *xorriso, char *line, int flag)
ret= Xorriso_interpreter(xorriso, argc, argv, &idx, flag&0xffff); ret= Xorriso_interpreter(xorriso, argc, argv, &idx, flag&0xffff);
if(ret<0) if(ret<0)
goto ex; goto ex;
gettimeofday(&tv,&tz); gettimeofday(&tv, NULL);
tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec)-tdiff-xorriso->idle_time; tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec)-tdiff-xorriso->idle_time;
if(tdiff<0.001) if(tdiff<0.001)
tdiff= 0.001; tdiff= 0.001;

View File

@ -857,8 +857,8 @@ int Sfile_home_adr_s(char *filename, char *fileadr, int fa_size, int flag)
double Sfile_microtime(int flag) double Sfile_microtime(int flag)
{ {
struct timeval tv; struct timeval tv;
struct timezone tz;
gettimeofday(&tv,&tz); gettimeofday(&tv, NULL);
return((double) (tv.tv_sec+1.0e-6*tv.tv_usec)); return((double) (tv.tv_sec+1.0e-6*tv.tv_usec));
} }

View File

@ -333,10 +333,9 @@ int Xorriso_dialog_input(struct XorrisO *xorriso, char line[], int linesize,
#endif /* Xorriso_with_line_editoR */ #endif /* Xorriso_with_line_editoR */
double tdiff; double tdiff;
struct timeval tv; struct timeval tv;
struct timezone tz;
struct Xorriso_lsT *next_lst; struct Xorriso_lsT *next_lst;
gettimeofday(&tv,&tz); gettimeofday(&tv, NULL);
tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec); tdiff= tv.tv_sec+(1.e-6*(double) tv.tv_usec);
fflush(stdout); fflush(stdout);
@ -485,7 +484,7 @@ ex:;
free(cpt); free(cpt);
#endif #endif
gettimeofday(&tv,&tz); gettimeofday(&tv, NULL);
xorriso->idle_time+= tv.tv_sec+(1.e-6*(double) tv.tv_usec)-tdiff; xorriso->idle_time+= tv.tv_sec+(1.e-6*(double) tv.tv_usec)-tdiff;
return(ret); return(ret);
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2016.03.09.205708" #define Xorriso_timestamP "2016.03.10.200551"