List of usage examples for java.lang.management ThreadMXBean isCurrentThreadCpuTimeSupported
public boolean isCurrentThreadCpuTimeSupported();
From source file:com.thoughtworks.go.server.service.builders.KillAllChildProcessTaskBuilderTest.java
public long getSystemTime() { ThreadMXBean bean = ManagementFactory.getThreadMXBean(); return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;//from w ww . j ava2 s.c o m }