From cda0ee3db017429875e5d61e5ab325501c8a48ce Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Wed, 21 Aug 2019 14:25:06 -0700 Subject: [PATCH] Revert "logd: wakeup wrap timeout if realtime changes drastically" This reverts commit 5e001776f405098cc825c9f6de546cd5b92b70e4. The next commit will use CLOCK_MONOTONIC for the timeout, so changes to CLOCK_REALTIME will no longer be an issue. Test: logcat output looks sane Change-Id: I84e5b2db3c25ea6a7024557dba7fa6cc8c9237e5 --- logd/FlushCommand.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/logd/FlushCommand.cpp b/logd/FlushCommand.cpp index bd1755553..0845504ac 100644 --- a/logd/FlushCommand.cpp +++ b/logd/FlushCommand.cpp @@ -49,18 +49,8 @@ void FlushCommand::runSocketCommand(SocketClient* client) { return; } if (entry->mTimeout.tv_sec || entry->mTimeout.tv_nsec) { - if (mReader.logbuf().isMonotonic()) { - LogTimeEntry::unlock(); - return; - } - // If the user changes the time in a gross manner that - // invalidates the timeout, fall through and trigger. - log_time now(CLOCK_REALTIME); - if (((entry->mEnd + entry->mTimeout) > now) && - (now > entry->mEnd)) { - LogTimeEntry::unlock(); - return; - } + LogTimeEntry::unlock(); + return; } entry->triggerReader_Locked(); LogTimeEntry::unlock();