]> 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:55:24 +0000 (19:55 +0000)
commitc430f53044705666071d41fa01005eba2a0c770f
tree172af3c9f72e97b3e7fb62c15d38153d193c11a3
parent9e06c8f5f67364345ccd060b837ff91d9bd41cd6
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 2e95a334a59e835617f371424130eddd0957f995)
apps/app_waitforsilence.c