Wireshark  4.3.0
The Wireshark network protocol analyzer
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
17 extern "C" {
18 #endif /* __cplusplus */
19 
23 WS_DLL_PUBLIC
24 time_t mktime_utc(struct tm *tm);
25 
32 WS_DLL_PUBLIC
33 bool tm_is_valid(struct tm *tm);
34 
43 WS_DLL_PUBLIC
44 void get_resource_usage(double *user_time, double *sys_time);
45 
56 WS_DLL_PUBLIC
57 void log_resource_usage(bool reset_delta, const char *format, ...);
58 
62 WS_DLL_PUBLIC
63 uint64_t create_timestamp(void);
64 
65 WS_DLL_PUBLIC
66 void ws_tzset(void);
67 
68 WS_DLL_PUBLIC
69 struct timespec *ws_clock_get_realtime(struct timespec *ts);
70 
71 WS_DLL_PUBLIC
72 struct tm *ws_localtime_r(const time_t *timep, struct tm *result);
73 
74 WS_DLL_PUBLIC
75 struct 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