]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_waitforsilence.c: Use milliseconds to calculate timeout time
authorIgor Goncharovsky <igorg@iqtek.ru>
Thu, 4 Sep 2025 04:00:50 +0000 (10:00 +0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 17 Sep 2025 17:40:38 +0000 (11:40 -0600)
commit5b5a512b33dd5c8de5fd3136740ea086d7182351
treebb9d3f28ee9f861683a4926833a08d344e0f6ba7
parent72f4f415bb9ea9a3e7372365f734f708d20dfbb1
app_waitforsilence.c: Use milliseconds to calculate timeout time

The functions WaitForNoise() and WaitForSilence() use the time()
functions to calculate elapsed time, which causes the timer to fire on
a whole second boundary, and the actual function execution time to fire
the timer may be 1 second less than expected. This fix replaces time()
with ast_tvnow().

Fixes: #1401
(cherry picked from commit a8afc93ebe391d43ac23426cacd7fc670d915dff)
apps/app_waitforsilence.c