90size_t cog_strndup(
const char src[],
size_t len,
char **p_dest);
#define PRINTF_LIKE(a, b)
Definition: attributes.h:4
int cog_u64tostr(char *str, size_t len, uint64_t *p_value)
Convert uint64_t to a numerical string.
int cog_sleep_ms(const long tms)
Sleep for amount of milliseconds.
long cog_timezone(void)
Get the difference between UTC and the latest local standard time, in seconds.
char * cog_load_whole_file_fp(FILE *fp, size_t *len)
Load file contents into a string.
int cog_iso8601_to_unix_ms(const char str[], size_t len, uint64_t *p_value)
Convert a iso8601 string to a unix timestamp (milliseconds)
int cog_unix_ms_to_iso8601(char str[], size_t len, const uint64_t value)
Convert a unix timestamp (milliseconds) to a iso8601 string.
char * cog_load_whole_file(const char filename[], size_t *len)
Load file contents into a string.
int cog_strtou64(char *str, size_t len, uint64_t *p_value)
Convert a numerical string to uint64_t
size_t cog_asprintf(char **strp, const char fmt[],...)
Copies at most len bytes of src to *p_dest.
size_t cog_strndup(const char src[], size_t len, char **p_dest)
Copies at most len bytes of src to *p_dest.
uint64_t cog_timestamp_us(void)
Get the current timestamp in microseconds.
uint64_t cog_timestamp_ms(void)
Get the current timestamp in milliseconds.
int cog_sleep_us(const long tms)
Sleep for amount of microseconds.