Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cda0ee3d authored by Tom Cherry's avatar Tom Cherry
Browse files

Revert "logd: wakeup wrap timeout if realtime changes drastically"

This reverts commit 5e001776.

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
parent 65abf395
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -49,19 +49,9 @@ 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;
                }
            }
            entry->triggerReader_Locked();
            LogTimeEntry::unlock();
            return;