diff options
author | Kyle Repinski <repinski23@gmail.com> | 2015-11-09 12:56:06 -0600 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-17 22:40:59 +0100 |
commit | f1690f97ba0d95aa73acdc3692bbceb58e6c90bd (patch) | |
tree | 39a4f4382afde8928c765ec81819905904bc71b5 | |
parent | 9fe751cd9c53c83ff8cb3cc076d4a573fe855043 (diff) | |
download | device_samsung_tuna-f1690f97ba0d95aa73acdc3692bbceb58e6c90bd.zip device_samsung_tuna-f1690f97ba0d95aa73acdc3692bbceb58e6c90bd.tar.gz device_samsung_tuna-f1690f97ba0d95aa73acdc3692bbceb58e6c90bd.tar.bz2 |
invensense: Ensure timestamps include time in suspend.
-rw-r--r-- | invensense/libinvensense_hal/MPLSensor.cpp | 2 | ||||
-rw-r--r-- | invensense/libinvensense_hal/SensorBase.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/invensense/libinvensense_hal/MPLSensor.cpp b/invensense/libinvensense_hal/MPLSensor.cpp index aa6c76a..835d46b 100644 --- a/invensense/libinvensense_hal/MPLSensor.cpp +++ b/invensense/libinvensense_hal/MPLSensor.cpp @@ -920,7 +920,7 @@ int64_t MPLSensor::now_ns(void) //FUNC_LOG; struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); + clock_gettime(CLOCK_BOOTTIME, &ts); return (int64_t) ts.tv_sec * 1000000000 + ts.tv_nsec; } diff --git a/invensense/libinvensense_hal/SensorBase.cpp b/invensense/libinvensense_hal/SensorBase.cpp index 9cc1ee8..d13d7e4 100644 --- a/invensense/libinvensense_hal/SensorBase.cpp +++ b/invensense/libinvensense_hal/SensorBase.cpp @@ -85,7 +85,7 @@ bool SensorBase::hasPendingEvents() const { int64_t SensorBase::getTimestamp() { struct timespec t; t.tv_sec = t.tv_nsec = 0; - clock_gettime(CLOCK_MONOTONIC, &t); + clock_gettime(CLOCK_BOOTTIME, &t); return int64_t(t.tv_sec)*1000000000LL + t.tv_nsec; } |