Chromium Code Reviews| Index: runtime/bin/thread_fuchsia.cc |
| diff --git a/runtime/bin/thread_fuchsia.cc b/runtime/bin/thread_fuchsia.cc |
| index fa5397ff131e138c50e7436be8be23242c9d1bf5..0e3408e7b68a390bdb5f9783cf0809575617276a 100644 |
| --- a/runtime/bin/thread_fuchsia.cc |
| +++ b/runtime/bin/thread_fuchsia.cc |
| @@ -8,9 +8,11 @@ |
| #include "bin/thread.h" |
| #include "bin/thread_fuchsia.h" |
| -#include <errno.h> // NOLINT |
| -#include <sys/resource.h> // NOLINT |
| -#include <sys/time.h> // NOLINT |
| +#include <errno.h> // NOLINT |
| +#include <magenta/syscalls.h> // NOLINT |
| +#include <magenta/types.h> // NOLINT |
| +#include <sys/resource.h> // NOLINT |
| +#include <sys/time.h> // NOLINT |
| #include "platform/assert.h" |
| #include "platform/utils.h" |
| @@ -166,7 +168,9 @@ bool Thread::Compare(ThreadId a, ThreadId b) { |
| void Thread::GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage) { |
|
rmacnak
2017/01/06 18:34:24
bin::Thread::GetThreadCpuUsage is unused. We shoul
zra
2017/01/07 22:45:17
Done.
|
| - UNIMPLEMENTED(); |
| + ASSERT(thread_id == GetCurrentThreadId()); |
| + ASSERT(cpu_usage != NULL); |
| + *cpu_usage = mx_time_get(MX_CLOCK_THREAD) / kNanosecondsPerMicrosecond; |
| } |