libamxc
1.10.3
C Generic Data Containers
|
Ambiorix timestamp header file. More...
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | _timestamp |
The timestamp structure (unix epoch time). More... | |
Typedefs | |
typedef struct _timestamp | amxc_ts_t |
The timestamp structure (unix epoch time). More... | |
Functions | |
int | amxc_ts_now (amxc_ts_t *tsp) |
Takes current time as unix epoch time. More... | |
int | amxc_ts_parse (amxc_ts_t *tsp, const char *str, size_t len) |
Transforms the given string in to unix epoch time. More... | |
size_t | amxc_ts_format (const amxc_ts_t *tsp, char *dst, size_t len) |
Transforms unix epoch time to a string. More... | |
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. More... | |
int | amxc_ts_compare (const amxc_ts_t *tsp1, const amxc_ts_t *tsp2) |
Checks if tsp1 comes after tsp2. More... | |
bool | amxc_ts_is_valid (const amxc_ts_t *tsp) |
Checks if a timestamp is valid. More... | |
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. More... | |
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. More... | |
int | amxc_ts_to_local (amxc_ts_t *tsp) |
Adds the local time offset to the timestamp structure. More... | |
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. More... | |
Ambiorix timestamp header file.
Definition in file amxc_timestamp.h.