|
@@ -3,9 +3,11 @@ package me.yoqi.composename;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import qh.lqg.utils.Messages;
|
|
import qh.lqg.utils.Messages;
|
|
import qh.lqg.utils.TextHelper;
|
|
import qh.lqg.utils.TextHelper;
|
|
|
|
+import qh.lqg.utils.TimeHelper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* ClassName: Compose <br/>
|
|
* ClassName: Compose <br/>
|
|
@@ -21,7 +23,7 @@ public class Compose {
|
|
public static void main(String args[]) throws Exception {
|
|
public static void main(String args[]) throws Exception {
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
|
|
System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
|
|
System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
|
|
- long starTime = System.currentTimeMillis();
|
|
|
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
String dataUrl = Messages.getString("Compose.data");
|
|
String dataUrl = Messages.getString("Compose.data");
|
|
String resultUrl = "data/result.txt";
|
|
String resultUrl = "data/result.txt";
|
|
String result = "";
|
|
String result = "";
|
|
@@ -42,13 +44,15 @@ public class Compose {
|
|
}
|
|
}
|
|
TextHelper.writeText(resultUrl, result);
|
|
TextHelper.writeText(resultUrl, result);
|
|
allChineseName = new ArrayList<String>();
|
|
allChineseName = new ArrayList<String>();
|
|
|
|
+ long endTime = System.currentTimeMillis();
|
|
|
|
+ System.out.println("当前耗时:"
|
|
|
|
+ + TimeHelper.getTimeDiff(startTime, endTime));
|
|
System.out.println(flag);
|
|
System.out.println(flag);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
long endTime = System.currentTimeMillis();
|
|
long endTime = System.currentTimeMillis();
|
|
- long Time = endTime - starTime;
|
|
|
|
System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
|
|
System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
|
|
- System.out.println("总共耗时:" + Time);
|
|
|
|
|
|
+ System.out.println("总耗时" + TimeHelper.getTimeDiff(startTime, endTime));
|
|
}
|
|
}
|
|
}
|
|
}
|