1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.contention;
15
16
17
18
19
20
21
22
23
24 public class MultiThreadedHarness extends AbstractMultiThreadedHarness {
25
26 final long overallDurationInMillis;
27
28 public MultiThreadedHarness(long overallDurationInMillis) {
29 this.overallDurationInMillis = overallDurationInMillis;
30 }
31
32 public void printEnvironmentInfo(String msg) {
33 System.out.println("=== " + msg + " ===");
34 System.out.println("java.runtime.version = " + System.getProperty("java.runtime.version"));
35 System.out.println("java.vendor = " + System.getProperty("java.vendor"));
36 System.out.println("java.version = " + System.getProperty("java.version"));
37 System.out.println("os.name = " + System.getProperty("os.name"));
38 System.out.println("os.version = " + System.getProperty("os.version"));
39 }
40
41 public void waitUntilEndCondition() throws InterruptedException {
42 Thread.sleep(overallDurationInMillis);
43 }
44 }