126127128129130131132133134135136
} } } long deadline = System.currentTimeMillis() + Math.min(reportIntervalMS, 10 * samplerIntervalMS); tmon.report(); System.out.println("Monitoring threads ..."); while(true) { while(System.currentTimeMillis() < deadline) { Thread.sleep(samplerIntervalMS); }
134135136137138139140141142143144
while(System.currentTimeMillis() < deadline) { Thread.sleep(samplerIntervalMS); } deadline += reportIntervalMS; System.out.println(); System.out.println(tmon.report()); System.out.println(); if (System.in.available() > 0) { return; } }