jdk/src/share/classes/sun/management/HotspotThread.java
public Map<String, Long> getInternalThreadCpuTimes() {
int count = getInternalThreadCount();
if (count == 0) {
return java.util.Collections.emptyMap();
}
String[] names = new String[count];
long[] times = new long[count];
int numThreads = getInternalThreadTimes0(names, times);
Map<String, Long> result = new HashMap<String, Long>(numThreads);
for (int i = 0; i < numThreads; i++) {
result.put(names[i], new Long(times[i]));
}
return result;
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.