From 9e260f184b2ce0d4316267bf5464795dfd8ac883 Mon Sep 17 00:00:00 2001 From: pbos Date: Thu, 20 Aug 2015 01:23:48 -0700 Subject: [PATCH] Prevent TimeUntilNextProcess log spam. Negative values from TimeUntilNextProcess indicate that the module wanted to run sooner than possible, not that an invalid error code was returned. As such it's not a contract error. BUG=webrtc:4879 NOTRY=true Review URL: https://codereview.webrtc.org/1257833004 Cr-Commit-Position: refs/heads/master@{#9740} --- webrtc/modules/utility/source/process_thread_impl.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webrtc/modules/utility/source/process_thread_impl.cc b/webrtc/modules/utility/source/process_thread_impl.cc index 4ce1675030..947fdb0db6 100644 --- a/webrtc/modules/utility/source/process_thread_impl.cc +++ b/webrtc/modules/utility/source/process_thread_impl.cc @@ -25,12 +25,9 @@ const int64_t kCallProcessImmediately = -1; int64_t GetNextCallbackTime(Module* module, int64_t time_now) { int64_t interval = module->TimeUntilNextProcess(); - // Currently some implementations erroneously return error codes from - // TimeUntilNextProcess(). So, as is, we correct that and log an error. if (interval < 0) { - LOG(LS_ERROR) << "TimeUntilNextProcess returned an invalid value " - << interval; - interval = 0; + // Falling behind, we should call the callback now. + return time_now; } return time_now + interval; }