From e044ec572a12673999a463e03c16029858129bc5 Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Thu, 21 Jul 2022 17:21:45 +0900 Subject: [PATCH] Don't print warning for tasks running 1ms earlier than planned. Bug: webrtc:12889 Change-Id: I33faa986130f2d7ae049466c303ef29b643d97ca Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268920 Commit-Queue: Daniel.L (Byoungchan) Lee Reviewed-by: Danil Chapovalov Cr-Commit-Position: refs/heads/main@{#37585} --- modules/rtp_rtcp/source/rtp_rtcp_impl2.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc index 7a35e47ef0..354eccb751 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc @@ -774,10 +774,14 @@ void ModuleRtpRtcpImpl2::MaybeSendRtcpAtOrAfterTimestamp( return; } - RTC_DLOG(LS_WARNING) - << "BUGBUG: Task queue scheduled delayed call too early."; + TimeDelta delta = execution_time - now; + // TaskQueue may run task 1ms earlier, so don't print warning if in this case. + if (delta > TimeDelta::Millis(1)) { + RTC_DLOG(LS_WARNING) << "BUGBUG: Task queue scheduled delayed call " + << delta << " too early."; + } - ScheduleMaybeSendRtcpAtOrAfterTimestamp(execution_time, execution_time - now); + ScheduleMaybeSendRtcpAtOrAfterTimestamp(execution_time, delta); } void ModuleRtpRtcpImpl2::ScheduleRtcpSendEvaluation(TimeDelta duration) {