80 #if !defined(__AMXC_TIMESTAMP_H__)
81 #define __AMXC_TIMESTAMP_H__
size_t amxc_ts_format(const amxc_ts_t *tsp, char *dst, size_t len)
Transforms unix epoch time to a string.
int amxc_ts_compare(const amxc_ts_t *tsp1, const amxc_ts_t *tsp2)
Checks if tsp1 comes after tsp2.
int amxc_ts_from_tm(amxc_ts_t *const tsp, struct tm *tmp)
Converts a broken down time in a struct tm to a timestamp structure.
int amxc_ts_to_local(amxc_ts_t *tsp)
Adds the local time offset to the timestamp structure.
int amxc_ts_parse(amxc_ts_t *tsp, const char *str, size_t len)
Transforms the given string in to unix epoch time.
bool amxc_ts_is_valid(const amxc_ts_t *tsp)
Checks if a timestamp is valid.
size_t amxc_ts_format_precision(const amxc_ts_t *tsp, char *dst, size_t len, int precision)
Transforms unix epoch time to a string.
int amxc_ts_to_tm_utc(const amxc_ts_t *tsp, struct tm *tmp)
Converts timestamp in unix epoch time to a struct tm type in UTC time.
int amxc_ts_now(amxc_ts_t *tsp)
Takes current time as unix epoch time.
int amxc_ts_to_tm_local(const amxc_ts_t *tsp, struct tm *tmp)
Converts timestamp in unix epoch time to a struct tm type in local time.
struct _timestamp amxc_ts_t
The timestamp structure (unix epoch time).
The timestamp structure (unix epoch time).