summaryrefslogtreecommitdiffstats
path: root/media/libnbaio
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-09-24 11:29:00 -0700
committerGlenn Kasten <gkasten@google.com>2012-09-24 11:48:20 -0700
commit99ae06be60d7ccd753a0808191583225e5533f3a (patch)
treedbffc4a569cf43347fb77e37e8f718546b838770 /media/libnbaio
parent4bf45909bcccb46acac61c155edd031e85b9dc12 (diff)
downloadframeworks_av-99ae06be60d7ccd753a0808191583225e5533f3a.zip
frameworks_av-99ae06be60d7ccd753a0808191583225e5533f3a.tar.gz
frameworks_av-99ae06be60d7ccd753a0808191583225e5533f3a.tar.bz2
Check clock_gettime(CLOCK_MONOTONIC) for failure
Bug: 7100774 Change-Id: I15a84a19bb6d6ef1d9dac4beaa03587638196404
Diffstat (limited to 'media/libnbaio')
-rw-r--r--media/libnbaio/MonoPipe.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libnbaio/MonoPipe.cpp b/media/libnbaio/MonoPipe.cpp
index c426efb..bbdc8c1 100644
--- a/media/libnbaio/MonoPipe.cpp
+++ b/media/libnbaio/MonoPipe.cpp
@@ -163,6 +163,9 @@ ssize_t MonoPipe::write(const void *buffer, size_t count)
if (nowTsValid && mWriteTsValid) {
time_t sec = nowTs.tv_sec - mWriteTs.tv_sec;
long nsec = nowTs.tv_nsec - mWriteTs.tv_nsec;
+ ALOGE_IF(sec < 0 || (sec == 0 && nsec < 0),
+ "clock_gettime(CLOCK_MONOTONIC) failed: was %ld.%09ld but now %ld.%09ld",
+ mWriteTs.tv_sec, mWriteTs.tv_nsec, nowTs.tv_sec, nowTs.tv_nsec);
if (nsec < 0) {
--sec;
nsec += 1000000000;