10#ifndef __TIME_UTIL_H__
11#define __TIME_UTIL_H__
125struct tm *
ws_gmtime_r(
const time_t *timep,
struct tm *result);
WS_DLL_PUBLIC time_t mktime_utc(struct tm *tm)
Converts a UTC-based broken-down time to a timestamp.
Definition time_util.c:35
WS_DLL_PUBLIC void get_resource_usage(double *user_time, double *sys_time)
Retrieves the current process CPU usage.
Definition time_util.c:153
WS_DLL_PUBLIC bool tm_is_valid(struct tm *tm)
Validates the fields of a broken-down time structure.
Definition time_util.c:124
WS_DLL_PUBLIC struct tm * ws_localtime_r(const time_t *timep, struct tm *result)
Converts a time value to local time.
Definition time_util.c:284
WS_DLL_PUBLIC struct timespec * ws_clock_get_realtime(struct timespec *ts)
Retrieves the current real-time clock value.
Definition time_util.c:258
WS_DLL_PUBLIC struct tm * ws_gmtime_r(const time_t *timep, struct tm *result)
Converts a time value to UTC (GMT).
Definition time_util.c:310
WS_DLL_PUBLIC void ws_tzset(void)
Initializes or updates timezone settings.
Definition time_util.c:302
WS_DLL_PUBLIC void log_resource_usage(bool reset_delta, const char *format,...)
Logs the process CPU usage along with a formatted message.
Definition time_util.c:180
WS_DLL_PUBLIC uint64_t create_timestamp(void)
Fetches the number of microseconds since the Unix epoch.
Definition time_util.c:208