summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2012-11-02 11:36:03 -0700
committer Brian Carlstrom <bdc@google.com> 2012-11-02 17:00:27 -0700
commitbcc2926b9721f94c17ed98fae5264cc98f0e066f (patch)
treeebc059463499b973804d52e0bba593a12cd0326e /src/utils.h
parentaf6eaca5034a602f459a6eca9fb185f3abe8a882 (diff)
Add dex2oat watch dog thread for host builds
Change-Id: I90b4b6b3a1aebb82955b4aa84d3f2d599af1d13b
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h8
1 files changed, 8 insertions, 0 deletions
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<std::string>& result);