libexplain
1.4.D001
|
#include <libexplain/string_buffer.h>
Go to the source code of this file.
Functions | |
void | explain_buffer_timespec (explain_string_buffer_t *sb, const struct timespec *data) |
void | explain_buffer_timespec_array (explain_string_buffer_t *sb, const struct timespec *data, unsigned data_size) |
void | explain_parse_timespec_or_die (const char *text, const char *caption, struct timespec *result) |
void explain_buffer_timespec | ( | explain_string_buffer_t * | sb, |
const struct timespec * | data | ||
) |
The explain_buffer_timespec function may be used to print a representation of a timespec structure.
sb | The string buffer to print into. |
data | The timespec structure to be printed. |
Definition at line 132 of file timespec.c.
void explain_buffer_timespec_array | ( | explain_string_buffer_t * | sb, |
const struct timespec * | data, | ||
unsigned | data_size | ||
) |
The explain_buffer_timespec_array function may be used to print a representation of a timespec structure.
sb | The string buffer to print into. |
data | The timespec structure to be printed. |
data_size | The number of elements in the array. |
Definition at line 143 of file timespec.c.
void explain_parse_timespec_or_die | ( | const char * | text, |
const char * | caption, | ||
struct timespec * | result | ||
) |
The explain_parse_timespec_or_die function is used to parse some text, to extract a timespec value. It could be a floating point number of seconds, it coule be one of the UTIME_* values, it could be free text as permitted by explain_parse_time_t
On error, ithis function does not return, but errors out using the usual libexplain error handling.
text | The text string to be parsed. |
caption | additionl context for fatal error message, if necessary |
result | where to put the answer on success |
Definition at line 165 of file timespec.c.