mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
main/cli.c: Refactor function to print seconds formatted
Refactor and created function ast_cli_print_timestr_fromseconds to print seconds formatted: year(s) week(s) day(s) hour(s) second(s) This function now is used in addons/cdr_mysql.c,cdr_pgsql.c, main/cli.c, res_config_ldap.c, res_config_pgsql.c. Change-Id: Ibeb8634102cd11d3f8623398b279cb731bcde36c
This commit is contained in:
@@ -315,6 +315,17 @@ char **ast_cli_completion_matches(const char *, const char *);
|
||||
*/
|
||||
char *ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos);
|
||||
|
||||
/*!
|
||||
* \since 13.8
|
||||
* \brief Print on cli a duration in seconds in format
|
||||
* %s year(s), %s week(s), %s day(s), %s hour(s), %s second(s)
|
||||
*
|
||||
* \param ast_cli_args fd to print by ast_cli
|
||||
* \param duration The time (in seconds) to print
|
||||
* \param prefix A Prefix string to add before of duration formatted
|
||||
*/
|
||||
void ast_cli_print_timestr_fromseconds(int fd, int seconds, const char *prefix);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user