From: Sebastien GODARD Date: Sat, 16 Jan 2016 13:29:37 +0000 (+0100) Subject: sadf: Don't set timestamps twice X-Git-Tag: v11.3.1~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9f4d9ad123e905cfec8e989f145ea7d9d1c0732;p=sysstat sadf: Don't set timestamps twice Remove call to sadf_get_record_timestamp_struct() function as it has already been called in read_next_sample() function. Signed-off-by: Sebastien GODARD --- diff --git a/sadf.c b/sadf.c index 54c1dbf..cce220c 100644 --- a/sadf.c +++ b/sadf.c @@ -628,9 +628,9 @@ void write_mech_stats(int curr, unsigned long dt, unsigned long long itv, * @cpu_nr Number of processors for current activity data file. * @rectime Structure where timestamp (expressed in local time * or in UTC depending on whether options -T/-t have - * been used or not) can be saved for current record. + * been used or not) has been saved for current record. * @loctime Structure where timestamp (expressed in local time) - * can be saved for current record. + * has been saved for current record. * @reset_cd TRUE if static cross_day variable should be reset. * * OUT: @@ -670,9 +670,6 @@ int write_parsable_stats(int curr, int reset, long *cnt, int use_tm_start, /* Not close enough to desired interval */ return 0; - /* Fill timestamp structure for current record */ - sadf_get_record_timestamp_struct(curr, rectime, loctime); - /* Check if we are beginning a new day */ if (use_tm_start && record_hdr[!curr].ust_time && (record_hdr[curr].ust_time > record_hdr[!curr].ust_time) && @@ -733,9 +730,9 @@ int write_parsable_stats(int curr, int reset, long *cnt, int use_tm_start, * @cpu_nr Number of processors. * @rectime Structure where timestamp (expressed in local time * or in UTC depending on whether options -T/-t have - * been used or not) can be saved for current record. + * been used or not) has been saved for current record. * @loctime Structure where timestamp (expressed in local time) - * can be saved for current record. + * has been saved for current record. * * OUT: * @cnt Set to 0 to indicate that no other lines of stats @@ -754,9 +751,6 @@ int write_textual_stats(int curr, int use_tm_start, int use_tm_end, int reset, char cur_date[32], cur_time[32]; static int cross_day = FALSE; - /* Fill timestamp structure (rectime) for current record */ - sadf_get_record_timestamp_struct(curr, rectime, loctime); - /* * Check time (1). * For this first check, we use the time interval entered on