summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-09-24 13:51:58 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-24 13:51:58 -0700
commit8d452f1c61aa70c4a86c4114532f2c0983120ef8 (patch)
tree0b31d36c3dbe51b243a707b29584bf9318e3825e /services/audioflinger
parentc0c3b298cbcf47feeeaa597a7621a0dd45f5a99e (diff)
parent80b3273cea8660fe8a5868d024d2788a1e083ffc (diff)
downloadframeworks_av-8d452f1c61aa70c4a86c4114532f2c0983120ef8.zip
frameworks_av-8d452f1c61aa70c4a86c4114532f2c0983120ef8.tar.gz
frameworks_av-8d452f1c61aa70c4a86c4114532f2c0983120ef8.tar.bz2
Merge "Check clock_gettime(CLOCK_MONOTONIC) for failure" into jb-mr1-dev
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/FastMixer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp
index 13003d9..3c8a256 100644
--- a/services/audioflinger/FastMixer.cpp
+++ b/services/audioflinger/FastMixer.cpp
@@ -454,6 +454,9 @@ bool FastMixer::threadLoop()
if (oldTsValid) {
time_t sec = newTs.tv_sec - oldTs.tv_sec;
long nsec = newTs.tv_nsec - oldTs.tv_nsec;
+ ALOGE_IF(sec < 0 || (sec == 0 && nsec < 0),
+ "clock_gettime(CLOCK_MONOTONIC) failed: was %ld.%09ld but now %ld.%09ld",
+ oldTs.tv_sec, oldTs.tv_nsec, newTs.tv_sec, newTs.tv_nsec);
if (nsec < 0) {
--sec;
nsec += 1000000000;