diff options
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r-- | include/asterisk/strings.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index 1b8733f50..8b0daab87 100644 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -252,6 +252,16 @@ void ast_join(char *s, size_t len, char * const w[]); */ int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed); +/* + \brief Parse a time (float) string. + \param src String to parse + \param dst Destination + \param _default Value to use if the string does not contain a valid time + \param consumed The number of characters 'consumed' in the string by the parse (see 'man sscanf' for details) + \return zero on success, non-zero on failure +*/ +int ast_get_timeval(const char *src, struct timeval *tv, struct timeval _default, int *consumed); + /*! * Support for dynamic strings. * |