void test() {
Locale locale = Locale.getDefault(); if (!TestUtils.usesAsciiDigits(locale)
|| !TestUtils.usesGregorianCalendar(locale)) {
System.out.println("Skipping this test because locale is " + locale); return;
}
masterFormat.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
DateParseThread d1 = new DateParseThread();
DateFormatThread d2 = new DateFormatThread();
d1.start();
d2.start(); int n = Thread.activeCount(); boolean failed = false;
for (int i = 0; i < duration; i++) { try { Thread.sleep(1000); if (Thread.activeCount() != n) {
failed = true; break;
}
} catch (InterruptedException e) {
}
}
runrun = false; try {
d1.join();
d2.join();
} catch (InterruptedException e) {
} if (failed) { thrownew RuntimeException("Failed");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.