summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2012-05-15 17:12:40 -0700
committer Elliott Hughes <enh@google.com> 2012-05-15 17:12:40 -0700
commit8f751ab92664926a36427a642d79b3a54d4c5e94 (patch)
tree666a48ce867b41c383c3a86d72b38f77c2dd3e19 /src
parent7834cbd5d8a0e61db14339910d2223a3e59d7efc (diff)
Make the epoch-related "can't happen" situation easier to spot.
Change-Id: If174c7424f7a71a994cb06ce5484fe0cf34702f1
Diffstat (limited to 'src')
-rw-r--r--src/monitor.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/monitor.cc b/src/monitor.cc
index e18d854d85..e11517f7f3 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -338,10 +338,8 @@ bool Monitor::Unlock(Thread* self) {
return true;
}
-/*
- * Converts the given relative waiting time into an absolute time.
- */
-static void ToAbsoluteTime(int64_t ms, int32_t ns, struct timespec *ts) {
+// Converts the given waiting time (relative to "now") into an absolute time in 'ts'.
+static void ToAbsoluteTime(int64_t ms, int32_t ns, timespec* ts) {
int64_t endSec;
#ifdef HAVE_TIMEDWAIT_MONOTONIC
@@ -356,7 +354,9 @@ static void ToAbsoluteTime(int64_t ms, int32_t ns, struct timespec *ts) {
#endif
endSec = ts->tv_sec + ms / 1000;
if (endSec >= 0x7fffffff) {
- LOG(INFO) << "Note: end time exceeds epoch";
+ std::ostringstream ss;
+ Thread::Current()->Dump(ss);
+ LOG(INFO) << "Note: end time exceeds epoch: " << ss.str();
endSec = 0x7ffffffe;
}
ts->tv_sec = endSec;