diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 23:07:33 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 23:07:33 +0000 |
commit | c702e92121ec5477ecc25a87b00bf478b42c1dc7 (patch) | |
tree | 962e68606a5718b59153d14ee28c319eb29a904b /epan/column-utils.c | |
parent | 74b6c5949957411e5ce95e5e4b1a34997cf31b09 (diff) |
Replace relative timestamp with reference frame number. Saves 16B per frame.
svn path=/trunk/; revision=50772
Diffstat (limited to 'epan/column-utils.c')
-rw-r--r-- | epan/column-utils.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index 6b25b7e97c..6546944bf8 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -971,20 +971,25 @@ set_time_hour_min_sec(const nstime_t *ts, gchar *buf) static void col_set_rel_time(const frame_data *fd, column_info *cinfo, const int col) { + nstime_t del_rel_ts; + if (!fd->flags.has_ts) { cinfo->col_buf[col][0] = '\0'; return; } + + frame_delta_abs_time(cinfo->epan, fd, fd->frame_ref_num, &del_rel_ts); + switch (timestamp_get_seconds_type()) { case TS_SECONDS_DEFAULT: - set_time_seconds(&fd->rel_ts, cinfo->col_buf[col]); + set_time_seconds(&del_rel_ts, cinfo->col_buf[col]); cinfo->col_expr.col_expr[col] = "frame.time_relative"; g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->col_buf[col],COL_MAX_LEN); break; case TS_SECONDS_HOUR_MIN_SEC: - set_time_hour_min_sec(&fd->rel_ts, cinfo->col_buf[col]); + set_time_hour_min_sec(&del_rel_ts, cinfo->col_buf[col]); cinfo->col_expr.col_expr[col] = "frame.time_relative"; - set_time_seconds(&fd->rel_ts, cinfo->col_expr.col_expr_val[col]); + set_time_seconds(&del_rel_ts, cinfo->col_expr.col_expr_val[col]); break; default: g_assert_not_reached(); @@ -1208,12 +1213,16 @@ set_fd_time(const epan_t *epan, frame_data *fd, gchar *buf) case TS_RELATIVE: if (fd->flags.has_ts) { + nstime_t del_rel_ts; + + frame_delta_abs_time(epan, fd, fd->frame_ref_num, &del_rel_ts); + switch (timestamp_get_seconds_type()) { case TS_SECONDS_DEFAULT: - set_time_seconds(&fd->rel_ts, buf); + set_time_seconds(&del_rel_ts, buf); break; case TS_SECONDS_HOUR_MIN_SEC: - set_time_seconds(&fd->rel_ts, buf); + set_time_seconds(&del_rel_ts, buf); break; default: g_assert_not_reached(); |