Bug 648735 - On OpenBSD, assume clock is monotonic; r=cjones
otherwise fails with:
ipc/chromium/src/base/time_posix.cc:181:2: error: #error No usable tick clock function on this platform.
--- a/ipc/chromium/src/base/time_posix.cc
+++ b/ipc/chromium/src/base/time_posix.cc
@@ -159,17 +159,17 @@ TimeTicks TimeTicks::Now() {
// to microseconds up front to stave off overflows.
absolute_micro = mach_absolute_time() / Time::kNanosecondsPerMicrosecond *
timebase_info.numer / timebase_info.denom;
// Don't bother with the rollover handling that the Windows version does.
// With numer and denom = 1 (the expected case), the 64-bit absolute time
// reported in nanoseconds is enough to last nearly 585 years.
-#elif defined(OS_POSIX) && \
+#elif defined(__OpenBSD__) || defined(OS_POSIX) && \
defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) {
NOTREACHED() << "clock_gettime(CLOCK_MONOTONIC) failed.";
return TimeTicks();
}