From b733d3ce2519bf6df2784fb7f5bfd1902c09a0dc Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 20 Feb 2024 09:24:32 -0500 Subject: [PATCH] MT#40962 remove 2 ms sleep exemption Go to sleep even if the sleep time is less than 2 ms. This makes the math a lot easier and shouldn't have a noticeable impact as this is a somewhat unnecessary attempt at optimization. Change-Id: Ibd97c216e529b4e0b2110f81200b649db6ff2764 --- core/AmMediaProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/AmMediaProcessor.cpp b/core/AmMediaProcessor.cpp index 97c60019..d36eeca3 100644 --- a/core/AmMediaProcessor.cpp +++ b/core/AmMediaProcessor.cpp @@ -249,7 +249,7 @@ void AmMediaProcessorThread::run() uint64_t diff = next_tick - now; - if(diff > 2000) // 2 ms + if(diff) usleep(diff); }