|
@@ -131,7 +131,7 @@ public class A {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void print_text(String status, String filename, boolean all, boolean sleep) {
|
|
|
+ public static void print_text(String status, String filename, boolean all, long milliseconds) {
|
|
|
File file = new File("img" + Constant.getSeperator() + filename);
|
|
|
if (file.exists() && file.isFile()) {
|
|
|
List<String> lineList = new ArrayList<String>();
|
|
@@ -160,9 +160,9 @@ public class A {
|
|
|
}
|
|
|
boolean isTextBlack = true;
|
|
|
for (String word : wordList) {
|
|
|
- if (sleep) {
|
|
|
+ if (milliseconds > 0) {
|
|
|
try {
|
|
|
- Thread.sleep(1000L);
|
|
|
+ Thread.sleep(milliseconds);
|
|
|
} catch (InterruptedException e) {
|
|
|
}
|
|
|
}
|
|
@@ -187,8 +187,8 @@ public class A {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
- A.print_text("good", "joke.txt", false, false);
|
|
|
- A.print_text("good", "joke.txt", false, false);
|
|
|
+ A.print_text("good", "joke.txt", false, 0);
|
|
|
+ A.print_text("good", "joke.txt", false, 0);
|
|
|
List<String> wordList = new ArrayList<String>();
|
|
|
A.chinese_split("我叫李太白,我是一个诗人,我生活在唐朝", wordList);
|
|
|
for (String word : wordList) {
|