mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
Make the Wait application accept time with fractions of a second
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
pbx.c
8
pbx.c
@@ -338,8 +338,8 @@ static struct pbx_builtin {
|
||||
|
||||
{ "Wait", pbx_builtin_wait,
|
||||
"Waits for some time",
|
||||
" Wait(seconds): Waits for a specified number of seconds, then returns 0.\n" },
|
||||
|
||||
" Wait(seconds): Waits for a specified number of seconds, then returns 0.\n"
|
||||
"seconds can be passed with fractions of a second. (eg: 1.5 = 1.5 seconds)\n" },
|
||||
};
|
||||
|
||||
/* Lock for the application list */
|
||||
@@ -4287,8 +4287,8 @@ static int pbx_builtin_wait(struct ast_channel *chan, void *data)
|
||||
{
|
||||
int ms;
|
||||
/* Wait for "n" seconds */
|
||||
if (data && atoi((char *)data)) {
|
||||
ms = atoi((char *)data) * 1000;
|
||||
if (data && atof((char *)data)) {
|
||||
ms = atof((char *)data) * 1000;
|
||||
return ast_safe_sleep(chan, ms);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user