summaryrefslogtreecommitdiffstats
path: root/runtime/thread.cc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-09 23:23:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-01-09 23:23:36 +0000
commit1de532495b2669ce4fae9b9d20848d78d83813d8 (patch)
tree362fff8964f1f2cd52beaf5b7445cb117f9c2dc4 /runtime/thread.cc
parent25d034cedea702c1f9ecb7a3a3ca977b07b9c3ba (diff)
parent0a18df82f4dea95b7398f8c934341fccbf04eeee (diff)
downloadart-1de532495b2669ce4fae9b9d20848d78d83813d8.zip
art-1de532495b2669ce4fae9b9d20848d78d83813d8.tar.gz
art-1de532495b2669ce4fae9b9d20848d78d83813d8.tar.bz2
Merge "Clean up some #ifdefs."
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r--runtime/thread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 527d758..6a1aeb5 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -592,13 +592,13 @@ void Thread::GetThreadName(std::string& name) const {
}
uint64_t Thread::GetCpuMicroTime() const {
-#if defined(HAVE_POSIX_CLOCKS)
+#if defined(__linux__)
clockid_t cpu_clock_id;
pthread_getcpuclockid(tlsPtr_.pthread_self, &cpu_clock_id);
timespec now;
clock_gettime(cpu_clock_id, &now);
return static_cast<uint64_t>(now.tv_sec) * UINT64_C(1000000) + now.tv_nsec / UINT64_C(1000);
-#else
+#else // __APPLE__
UNIMPLEMENTED(WARNING);
return -1;
#endif