Browse Source

增加耗时打印

luxueshi 3 years ago
parent
commit
232636306d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/main/java/Test.java

+ 4 - 4
src/main/java/Test.java

@@ -17,8 +17,8 @@ public class Test {
      * @param args
      */
     public static void main(String[] args) {
-        String path1 = "D:\\data\\test1";
-        String path2 = "D:\\data\\test2";
+        String path1 = "D:\\data\\D-physical_world";
+        String path2 = "D:\\data\\test\\D-physical_world";
         TestThread testThread = new TestThread(path1, path2);
         testThread.start();
     }
@@ -36,7 +36,7 @@ public class Test {
         public void run() {
             while (true) {
                 try {
-                    TimeUnit.SECONDS.sleep(10);
+                    TimeUnit.SECONDS.sleep(5);
                 } catch (InterruptedException e) {
                     e.printStackTrace();
                 }
@@ -47,7 +47,7 @@ public class Test {
                     e.printStackTrace();
                 }
                 long end = System.currentTimeMillis();
-                System.out.println(end - begin);
+                System.out.println("耗时:"+(end - begin) + "ms");
             }
         }
     }