logd: liblog: logcat: switch to android_log_clockid()
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()
Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
diff --git a/liblog/logprint.c b/liblog/logprint.c
index ebf9786..ad52a81 100644
--- a/liblog/logprint.c
+++ b/liblog/logprint.c
@@ -203,7 +203,7 @@
p_ret->year_output = false;
p_ret->zone_output = false;
p_ret->epoch_output = false;
- p_ret->monotonic_output = android_log_timestamp() == 'm';
+ p_ret->monotonic_output = android_log_clockid() == CLOCK_MONOTONIC;
return p_ret;
}
@@ -1262,7 +1262,7 @@
nsec = entry->tv_nsec;
if (p_format->monotonic_output) {
// prevent convertMonotonic from being called if logd is monotonic
- if (android_log_timestamp() != 'm') {
+ if (android_log_clockid() != CLOCK_MONOTONIC) {
struct timespec time;
convertMonotonic(&time, entry);
now = time.tv_sec;