]> 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)
committerIgor Goncharovsky <igorg@iqtek.ru>
Mon, 8 Sep 2025 14:27:24 +0000 (14:27 +0000)
commit2e95a334a59e835617f371424130eddd0957f995
tree7e55d31f454a70c2585fedde735e56d4bf18f719
parentc291f6784737ba7861aa985a0bde923c6e9bed44
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
apps/app_waitforsilence.c