Lines Matching refs:offset
230 * Retrieves CHRE's current estimated offset between the local CHRE clock
232 * SystemClock.elapsedRealtimeNanos(). This offset is formed as host time minus
241 * some fixed/invalid value while waiting for the initial offset estimate to be
242 * determined - this initial offset must be ready before nanoapps are started.
244 * @returns An estimate of the offset between CHRE's time returned in
247 * milliseconds, such that adding this offset to chreGetTime() produces the
268 int64_t offset = chreGetEstimatedHostTimeOffset();
271 // Just casting time to int64_t and adding the (potentially negative) offset
275 if (offset >= 0) {
276 time += (uint64_t) offset;
279 // this will never underflow, because offset = hostTime - chreTime,
281 // the offset, if hostTime is 0 and chreTime is 100 we'll have
282 // offset = -100, but chreGetTime() will always return >= 100 after that
284 time -= (uint64_t) (offset * -1);