summaryrefslogtreecommitdiffstats
path: root/libsensors/SensorBase.cpp
diff options
context:
space:
mode:
authorrINanDO <drjisakh@gmail.com>2016-03-12 22:00:37 +0100
committerrINanDO <drjisakh@gmail.com>2016-03-14 14:07:44 +0100
commita967c34271a9a138047d3f7b50981a354bffd45a (patch)
treee25c00b54dadfd7d303219641d806fc0c95f673d /libsensors/SensorBase.cpp
parentad7468b66cec447f60080f99a97781d5d797c916 (diff)
downloaddevice_samsung_i9100-a967c34271a9a138047d3f7b50981a354bffd45a.zip
device_samsung_i9100-a967c34271a9a138047d3f7b50981a354bffd45a.tar.gz
device_samsung_i9100-a967c34271a9a138047d3f7b50981a354bffd45a.tar.bz2
i9100: libsensors: use CLOCK_BOOTTIME, not CLOCK_MONOTONIC.
This fixes rotation issues without using the hack 'config_useSystemClockforRotationSensor'. Change-Id: I9b6afc46b4dfabc69e4d4ad215de7a9f2ea15347
Diffstat (limited to 'libsensors/SensorBase.cpp')
-rw-r--r--libsensors/SensorBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsensors/SensorBase.cpp b/libsensors/SensorBase.cpp
index dcb3acc..d388db5 100644
--- a/libsensors/SensorBase.cpp
+++ b/libsensors/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;
}