From bcc2926b9721f94c17ed98fae5264cc98f0e066f Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Fri, 2 Nov 2012 11:36:03 -0700 Subject: Add dex2oat watch dog thread for host builds Change-Id: I90b4b6b3a1aebb82955b4aa84d3f2d599af1d13b --- src/utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 719ce572a7..d33cc4bf37 100644 --- a/src/utils.h +++ b/src/utils.h @@ -285,6 +285,14 @@ static inline uint64_t MsToNs(uint64_t ns) { return ns * 1000 * 1000; } +#if defined(__APPLE__) +// No clocks to specify on OS/X, fake value to pass to routines that require a clock. +#define CLOCK_REALTIME 0xebadf00d +#endif + +// Initialize a timespec to either an absolute or relative time. +void InitTimeSpec(bool absolute, int clock, int64_t ms, int32_t ns, timespec* ts); + // Splits a string using the given separator character into a vector of // strings. Empty strings will be omitted. void Split(const std::string& s, char separator, std::vector& result); -- cgit v1.2.3-59-g8ed1b