sm8450-common: gps: GNSS adapter: need to check validity of elapsed real time
1: Need to check the validity of elapased real time before marking it as valid 2: Increase the allowed time between two get boot time call from 10 micro seconds to 2 milli-seconds Change-Id: If2f7ddb23ce72cb52f294ff44353f5c9a9421a9c CRs-fixed: 3281559
This commit is contained in:
@@ -1171,7 +1171,7 @@ bool ElapsedRealtimeEstimator::getCurrentTime(
|
||||
struct timespec sinceBootTime = {};
|
||||
struct timespec sinceBootTimeTest = {};
|
||||
bool clockGetTimeSuccess = false;
|
||||
const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 10000;
|
||||
const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 2000000; // 2 milli-seconds
|
||||
const uint32_t MAX_GET_TIME_COUNT = 20;
|
||||
/* Attempt to get CLOCK_REALTIME and CLOCK_BOOTIME in succession without an interruption
|
||||
or context switch (for up to MAX_GET_TIME_COUNT times) to avoid errors in the calculation */
|
||||
|
Reference in New Issue
Block a user