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

Commit 8058888d authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Reduce TimeSyncer frequency to once every 60 secs, added some logs" into jb-mr2-dev

parents 7a09d501 8f24c039
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -102,6 +102,10 @@ void TimeSyncer::onMessageReceived(const sp<AMessage> &msg) {

        case kWhatSendPacket:
        {
            if (mHistory.size() == 0) {
                ALOGI("starting batch");
            }

            TimeInfo ti;
            memset(&ti, 0, sizeof(ti));

@@ -229,6 +233,8 @@ void TimeSyncer::onMessageReceived(const sp<AMessage> &msg) {
                        } else {
                            notifyOffset();

                            ALOGI("batch done");

                            mHistory.clear();
                            postSendPacket(kBatchDelayUs);
                        }
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ private:
        kNumPacketsPerBatch = 30,
    };
    static const int64_t kTimeoutDelayUs = 500000ll;
    static const int64_t kBatchDelayUs = 10000000ll;  // every 10 secs
    static const int64_t kBatchDelayUs = 60000000ll;  // every minute

    sp<ANetworkSession> mNetSession;
    sp<AMessage> mNotify;