]> 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)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 8 Sep 2025 14:27:32 +0000 (14:27 +0000)
commit39c677e0dfbf765c194e0eb95fd93d9e9ccea2e2
treee32f2882f411c4d7938eb2936b7b9107ddd6f8a8
parent96e8535e842f51d5783c53b1c5868eaa1c28f041
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