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

Commit b1f9662d authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "MediaMetrics: Remove remaining BOOTTIME references" into rvc-dev am: fb471f4f

Change-Id: I37ef43ee9a8caf425f1d233b7ce1ae46eae1f26d
parents 57eb313e fb471f4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ bool MediaMetricsService::expirations_l(const std::shared_ptr<const mediametrics
                break;
            }
            if (now > when && (now - when) <= mMaxRecordAgeNs) {
                break;  // TODO: if we use BOOTTIME, should be monotonic.
                break; // Note SYSTEM_TIME_REALTIME may not be monotonic.
            }
            if (i >= mMaxRecordsExpiredAtOnce) {
                // this represents "one too many"; tell caller there are
+4 −4
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ private:

        template <typename T>
        status_t getValue(const std::string &property, T* value, int64_t time = 0) const {
            if (time == 0) time = systemTime(SYSTEM_TIME_BOOTTIME);
            if (time == 0) time = systemTime(SYSTEM_TIME_REALTIME);
            const auto tsptr = mPropertyMap.find(property);
            if (tsptr == mPropertyMap.end()) return BAD_VALUE;
            const auto& timeSequence = tsptr->second;
@@ -122,7 +122,7 @@ private:
        template <typename T>
        void putValue(const std::string &property,
                T&& e, int64_t time = 0) {
            if (time == 0) time = systemTime(SYSTEM_TIME_BOOTTIME);
            if (time == 0) time = systemTime(SYSTEM_TIME_REALTIME);
            mLastModificationTime = time;
            if (mPropertyMap.size() >= kKeyMaxProperties &&
                    !mPropertyMap.count(property)) {
@@ -340,7 +340,7 @@ public:
    /**
     * Individual property put.
     *
     * Put takes in a time (if none is provided then BOOTTIME is used).
     * Put takes in a time (if none is provided then SYSTEM_TIME_REALTIME is used).
     */
    template <typename T>
    status_t put(const std::string &url, T &&e, int64_t time = 0) {
@@ -349,7 +349,7 @@ public:
        std::shared_ptr<KeyHistory> keyHistory =
            getKeyHistoryFromUrl(url, &key, &prop);
        if (keyHistory == nullptr) return BAD_VALUE;
        if (time == 0) time = systemTime(SYSTEM_TIME_BOOTTIME);
        if (time == 0) time = systemTime(SYSTEM_TIME_REALTIME);
        std::lock_guard lock(getLockForKey(key));
        keyHistory->putValue(prop, std::forward<T>(e), time);
        return NO_ERROR;