os::current_thread_cpu_time()
-
//Linux版(jdk7/hotspot/src/os/linux/vm/os_linux.cpp) jlong os::current_thread_cpu_time() { if (os::Linux::supports_fast_thread_cpu_time()) { return os::Linux::fast_thread_cpu_time(CLOCK_THREAD_CPUTIME_ID); } else { // return user + sys since the cost is the same return slow_thread_cpu_time(Thread::current(), true /* user + sys */); } }