diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-08-01 08:27:00 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-08-01 08:27:00 +0000 |
commit | d451acb66cce2ac3e881b66226c43098794dad9b (patch) | |
tree | d0545b539587d315a902b5977d62508b03ba20b8 /epan/to_str.h | |
parent | 0363dc030d25d264e77818edc4473ddcef50f9d7 (diff) | |
download | wireshark-d451acb66cce2ac3e881b66226c43098794dad9b.tar.gz |
Add a "time_secs_to_str_buf()" routine, which takes seconds and
fractions-of-a-second (the units of which are either milliseconds or
microseconds, specified by a Boolean argument), and formats it into a
"DD days, HH hours, MM minutes, SS seconds" using a buffer supplied to
it. Have "time_secs_to_str()" and "time_msecs_to_str()" both use it.
Also, have it correctly handle the case of SS being > 0 but < 1 (which
"time_msecs_to_str()" didn't do).
Rename "rel_time_to_str()" to "rel_time_to_secs_str()", and add a
"rel_time_to_str()" routine that takes a "struct timeval" and hands its
seconds and microseconds values to "time_secs_to_str_buf()". Use
"rel_time_to_secs_str()" to format FT_RELATIVE_TIME values for now; we
might want to use "rel_time_to_str()" for them, though, or make it an
option (either a user option, or a per-field option, using the field
that also holds BASE_ values).
svn path=/trunk/; revision=3806
Diffstat (limited to 'epan/to_str.h')
-rw-r--r-- | epan/to_str.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/to_str.h b/epan/to_str.h index c657d523d3..e706f9e60b 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -1,12 +1,11 @@ /* to_str.h * Definitions for utilities to convert various other types to strings. * - * $Id: to_str.h,v 1.3 2001/07/13 00:27:51 guy Exp $ + * $Id: to_str.h,v 1.4 2001/08/01 08:27:00 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -56,6 +55,7 @@ gchar* time_msecs_to_str(guint32); gchar* abs_time_to_str(struct timeval*); void display_signed_time(gchar *, int, gint32, gint32); gchar* rel_time_to_str(struct timeval*); +gchar* rel_time_to_secs_str(struct timeval*); char * decode_bitfield_value(char *buf, guint32 val, guint32 mask, int width); |