We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6b408 commit d31571aCopy full SHA for d31571a
src/main/java/com/performance/StopWatchDemo.java
@@ -20,8 +20,13 @@ public static void stopWatch() throws InterruptedException {
20
Thread.sleep(1000);
21
stopWatch.stop();
22
23
- //统计耗时
+ System.out.println("总耗时以及各个任务耗时如下:\n");
24
System.out.println(stopWatch.prettyPrint());
25
+ System.out.println("总耗时:"+ stopWatch.getTotalTimeMillis());
26
+ System.out.println("最后一个任务的线程名称:"+ stopWatch.getLastTaskName());
27
+
28
29
30
}
31
32
0 commit comments