diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-22 07:12:20 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-22 07:12:20 +0000 |
commit | 5c63327c1abd4ab2d8ae80d9e86c5a61354cae37 (patch) | |
tree | df3523ea31c067e87cc28e452eaa70b33a565774 /timestats.h | |
parent | 6d89f9b1575d633b44be15c3624db00be12e5651 (diff) |
Add a "time_stat_init()" routine to initialize the fields of a
"timestat_t".
Move "nstime_to_msec()" to "epan/nstime.c", as it has nothing to do with
a "timestat_t".
Use structure assignment when possible.
Fix the "addtime()" macro and use it in "time_stat_update()".
Use "timestat_t"s, and the routines to manipulate them, in the service
response time table code.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15509 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'timestats.h')
-rw-r--r-- | timestats.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/timestats.h b/timestats.h index 4a6417f6ba..90fbd61883 100644 --- a/timestats.h +++ b/timestats.h @@ -43,10 +43,12 @@ typedef struct _timestat_t { /* functions */ -/* converts nstime to gdouble, time base is milli seconds*/ -extern gdouble nstime_to_msec(const nstime_t *time); +/* Initialize a timestat_t struct */ +extern void time_stat_init(timestat_t *stats); +/* Update a timestat_t struct with a new sample */ extern void time_stat_update(timestat_t *stats, const nstime_t *delta, packet_info *pinfo); + extern gdouble get_average(const nstime_t *sum, guint32 num); #endif |