]> 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)
committerAsterisk Development Team <asteriskteam@digium.com>
Wed, 10 Sep 2025 19:53:00 +0000 (19:53 +0000)
commit509b90dc6d67f005c4341e73d634e011b191da22
tree1963611a73c6bb3a09f9f88aa4f8d4f0b7384696
parentf8bc41269f5e757f793d5d23a1b82d5ab1148a0c
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 e6ade6ddbd44f40223c9f24d2bdb8eefc49ed807)
apps/app_waitforsilence.c