commit | 1e9e508e897e6559f4bd00c6c31033ffd75abc94 | [log] [tgz] |
---|---|---|
author | Hanson_Pu <hanson_pu@htc.com> | Tue Sep 02 15:10:31 2014 +0800 |
committer | The Android Automerger <android-build@google.com> | Wed Sep 03 12:13:35 2014 -0700 |
tree | 4f5d97c1b6bfb0b80e6b49cca06a7418cdd2d43f | |
parent | 61d2f99b55fe579c393d803bc9ef256279ac65fd [diff] |
sensor_hub: Correct timestamp to elapsedRealtimeNanos Change-Id: I5d4452b4bf4a185ed06bc6b7c3de5fdfa8729372
diff --git a/sensor_hub/libsensors/SensorBase.cpp b/sensor_hub/libsensors/SensorBase.cpp index 8c9cf70..6fcf871 100644 --- a/sensor_hub/libsensors/SensorBase.cpp +++ b/sensor_hub/libsensors/SensorBase.cpp
@@ -109,7 +109,7 @@ int64_t SensorBase::getTimestamp() { struct timespec t; t.tv_sec = t.tv_nsec = 0; - clock_gettime(CLOCK_REALTIME, &t); + clock_gettime(CLOCK_BOOTTIME, &t); return int64_t(t.tv_sec)*NS_PER_SEC + t.tv_nsec; }