mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Use CLOCK_BOOTTIME for default sensor implementation" am: bd0d99e730 am: 6bdfc478cf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1817938 Change-Id: I65ffeb704f4fea1a0905289d31daf9c2e62eb588
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user