Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
timestats.h
Go to the documentation of this file.
1
11#pragma once
12#include "epan/packet_info.h"
13#include "wsutil/nstime.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif /* __cplusplus */
18
19 /* Summary of time statistics*/
20typedef struct _timestat_t {
21 uint32_t num; /* number of samples */
22 uint32_t min_num; /* frame number of minimum */
23 uint32_t max_num; /* frame number of maximum */
24 nstime_t min;
25 nstime_t max;
26 nstime_t tot;
27 double variance;
29
30/* functions */
31
37WS_DLL_PUBLIC void time_stat_init(timestat_t *stats);
38
48WS_DLL_PUBLIC void time_stat_update(timestat_t *stats, const nstime_t *delta, packet_info *pinfo);
49
57WS_DLL_PUBLIC double get_average(const nstime_t *sum, uint32_t num);
58
59#ifdef __cplusplus
60}
61#endif /* __cplusplus */
Definition packet_info.h:40
Definition timestats.h:20
Definition nstime.h:26
WS_DLL_PUBLIC void time_stat_update(timestat_t *stats, const nstime_t *delta, packet_info *pinfo)
Update time statistics with a new sample.
Definition timestats.c:31
WS_DLL_PUBLIC double get_average(const nstime_t *sum, uint32_t num)
Calculate the average time from a sum of time values.
Definition timestats.c:66
WS_DLL_PUBLIC void time_stat_init(timestat_t *stats)
Initialize a timestat_t structure.
Definition timestats.c:18