maven works
parent
088ac0a7be
commit
89fb8323f4
|
@ -14,7 +14,7 @@ public class Factory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String... args) throws InterruptedException {
|
public static void main(String... args) throws InterruptedException {
|
||||||
var now = System.currentTimeMillis();
|
var now = System.currentTimeMillis(); //? Timer
|
||||||
var threads = new Thread[100];
|
var threads = new Thread[100];
|
||||||
for (var i = 0; i < 100; i++) {
|
for (var i = 0; i < 100; i++) {
|
||||||
threads[i] = new Thread(() -> {
|
threads[i] = new Thread(() -> {
|
||||||
|
@ -26,7 +26,8 @@ public class Factory {
|
||||||
for (var i = 0; i < 100; i++) {
|
for (var i = 0; i < 100; i++) {
|
||||||
threads[i].join();
|
threads[i].join();
|
||||||
}
|
}
|
||||||
var time = System.currentTimeMillis() - now;
|
|
||||||
System.out.println("Dauer: " + time + "ms");
|
var time = System.currentTimeMillis() - now; //? Timer
|
||||||
|
System.out.println("Dauer: " + time + "ms"); //? Timer
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue