diff options
-rw-r--r-- | libsensors/AkmSensor.cpp | 2 | ||||
-rw-r--r-- | libsensors/SensorBase.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp index e26e281..bab6f6c 100644 --- a/libsensors/AkmSensor.cpp +++ b/libsensors/AkmSensor.cpp @@ -253,7 +253,7 @@ int AkmSensor::readEvents(sensors_event_t* data, int count) processEvent(event->code, event->value); mInputReader.next(); } else if (type == EV_SYN) { - int64_t time = timevalToNano(event->time); + int64_t time = getTimestamp(); for (int j=0 ; count && mPendingMask && j<numSensors ; j++) { if (mPendingMask & (1<<j)) { mPendingMask &= ~(1<<j); 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; } |