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

Commit 4fa24c3e authored by Hsin-Yi Chen's avatar Hsin-Yi Chen Committed by Automerger Merge Worker
Browse files

Merge "Use CLOCK_BOOTTIME for default sensor implementation" am: bd0d99e7...

Merge "Use CLOCK_BOOTTIME for default sensor implementation" am: bd0d99e7 am: 6bdfc478 am: 22069fae

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1817938

Change-Id: Iceb3f1456a4f6d64590aecf3658f447bec42d50f
parents 42bbd8da 22069fae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ void Sensor::run() {
            });
        } else {
            timespec curTime;
            clock_gettime(CLOCK_REALTIME, &curTime);
            clock_gettime(CLOCK_BOOTTIME, &curTime);
            int64_t now = (curTime.tv_sec * kNanosecondsInSeconds) + curTime.tv_nsec;
            int64_t nextSampleTime = mLastSampleTimeNs + mSamplingPeriodNs;

+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ void Sensor::run() {
            });
        } else {
            timespec curTime;
            clock_gettime(CLOCK_REALTIME, &curTime);
            clock_gettime(CLOCK_BOOTTIME, &curTime);
            int64_t now = (curTime.tv_sec * kNanosecondsInSeconds) + curTime.tv_nsec;
            int64_t nextSampleTime = mLastSampleTimeNs + mSamplingPeriodNs;