Sleep until the given epoch.
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Wait until specified time" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static char * | app = "WaitUntil" |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ waituntil_exec()
static int waituntil_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 72 of file app_waituntil.c.
References ast_log, ast_safe_sleep(), ast_strlen_zero, ast_tvdiff_ms(), ast_tvnow(), LOG_NOTICE, LOG_WARNING, and pbx_builtin_setvar_helper().
Referenced by load_module().
77 struct timeval future = { 0, };
87 if (sscanf(data,
"%30ld%30lf", &seconds, &fraction) == 0) {
93 future.tv_sec = seconds;
94 future.tv_usec = fraction * 1000000;
97 ast_log(
LOG_NOTICE,
"WaitUntil called in the past (now %ld, arg %ld)\n", (
long)now.tv_sec, (
long)future.tv_sec);
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
int64_t ast_tvdiff_ms(struct timeval end, struct timeval start)
Computes the difference (in milliseconds) between two struct timeval instances.
#define ast_strlen_zero(foo)
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
◆ __mod_info
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Wait until specified time" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static |
◆ app
◆ ast_module_info