logd: liblog: logcat: switch to android_log_clockid() (2)
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()
Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp
index fd5c066..c8127c3 100644
--- a/logd/LogBuffer.cpp
+++ b/logd/LogBuffer.cpp
@@ -128,7 +128,7 @@
}
}
bool lastMonotonic = monotonic;
- monotonic = android_log_timestamp() == 'm';
+ monotonic = android_log_clockid() == CLOCK_MONOTONIC;
if (lastMonotonic == monotonic) {
return;
}
@@ -167,7 +167,7 @@
}
LogBuffer::LogBuffer(LastLogTimes *times):
- monotonic(android_log_timestamp() == 'm'),
+ monotonic(android_log_clockid() == CLOCK_MONOTONIC),
mTimes(*times) {
pthread_mutex_init(&mLogElementsLock, NULL);