Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
time_util.h
Go to the documentation of this file.
1
10#ifndef __TIME_UTIL_H__
11#define __TIME_UTIL_H__
12
13#include <wireshark.h>
14#include <time.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
23WS_DLL_PUBLIC
24time_t mktime_utc(struct tm *tm);
25
32WS_DLL_PUBLIC
33bool tm_is_valid(struct tm *tm);
34
43WS_DLL_PUBLIC
44void get_resource_usage(double *user_time, double *sys_time);
45
56WS_DLL_PUBLIC
57void log_resource_usage(bool reset_delta, const char *format, ...);
58
62WS_DLL_PUBLIC
63uint64_t create_timestamp(void);
64
65WS_DLL_PUBLIC
66void ws_tzset(void);
67
68WS_DLL_PUBLIC
69struct timespec *ws_clock_get_realtime(struct timespec *ts);
70
71WS_DLL_PUBLIC
72struct tm *ws_localtime_r(const time_t *timep, struct tm *result);
73
74WS_DLL_PUBLIC
75struct tm *ws_gmtime_r(const time_t *timep, struct tm *result);
76
77#ifdef __cplusplus
78}
79#endif /* __cplusplus */
80
81#endif /* __TIME_UTIL_H__ */
WS_DLL_PUBLIC time_t mktime_utc(struct tm *tm)
Definition time_util.c:35
WS_DLL_PUBLIC void get_resource_usage(double *user_time, double *sys_time)
Definition time_util.c:153
WS_DLL_PUBLIC bool tm_is_valid(struct tm *tm)
Definition time_util.c:124
WS_DLL_PUBLIC void log_resource_usage(bool reset_delta, const char *format,...)
Definition time_util.c:180
WS_DLL_PUBLIC uint64_t create_timestamp(void)
Definition time_util.c:208