diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-09-14 07:10:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-09-14 07:10:13 +0000 |
commit | 1d42c94b05cf2e4ec056d780b919a05159a17b72 (patch) | |
tree | f03564f0bad20129e2a6ef83bc198287372a9cae /epan/to_str.h | |
parent | e32028f6cd3ea4a18a7364fbb32affb4077217d0 (diff) | |
download | wireshark-1d42c94b05cf2e4ec056d780b919a05159a17b72.tar.gz wireshark-1d42c94b05cf2e4ec056d780b919a05159a17b72.tar.bz2 wireshark-1d42c94b05cf2e4ec056d780b919a05159a17b72.zip |
Make the resolution for time values be nanoseconds rather than
microseconds.
Fix some "signed vs. unsigned" comparison warnings.
svn path=/trunk/; revision=3934
Diffstat (limited to 'epan/to_str.h')
-rw-r--r-- | epan/to_str.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/epan/to_str.h b/epan/to_str.h index e706f9e60b..18a412f90e 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -1,7 +1,7 @@ /* to_str.h * Definitions for utilities to convert various other types to strings. * - * $Id: to_str.h,v 1.4 2001/08/01 08:27:00 guy Exp $ + * $Id: to_str.h,v 1.5 2001/09/14 07:10:10 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -25,7 +25,7 @@ #ifndef __TO_STR_H__ #define __TO_STR_H__ -#include "glib.h" +#include <glib.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> @@ -35,6 +35,17 @@ # include <netinet/in.h> #endif +#include "nstime.h" + +/* + * Resolution of a time stamp. + */ +typedef enum { + MSECS, /* milliseconds */ + USECS, /* microseconds */ + NSECS /* nanoseconds */ +} time_res_t; + /* * These are utility functions which convert various types to strings, * but for which no more specific module applies. @@ -52,10 +63,10 @@ gchar* ipxnet_to_str_punct(const guint32 ad, char punct); gchar* vines_addr_to_str(const guint8 *addrp); gchar* time_secs_to_str(guint32); 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*); +gchar* abs_time_to_str(nstime_t*); +void display_signed_time(gchar *, int, gint32, gint32, time_res_t); +gchar* rel_time_to_str(nstime_t*); +gchar* rel_time_to_secs_str(nstime_t*); char * decode_bitfield_value(char *buf, guint32 val, guint32 mask, int width); |