Skip to content

Commit 47b9c5b

Browse files
committed
System Touch
1 parent 84d7fcb commit 47b9c5b

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

source/Main.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,7 @@ public class Main
3434

3535
public Main()
3636
{
37-
System.out.print("-\r");
38-
39-
System.out.print("+\r");
40-
41-
System.out.print("-\r");
42-
43-
System.out.print("+\r");
37+
CommonRails.printSpinner();
4438

4539
System.out.println("[ Java National Finance Engine v.28.1.1 Software Processes Starting ]");
4640

source/commons/CommonRails.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,33 @@ public static <T> Integer size(ArrayList<T> list)
6666
return list.size();
6767
}
6868

69+
public static void printSpinner()
70+
{
71+
for(int i=0; i<250; i++)
72+
{
73+
try
74+
{
75+
System.out.print("- Loading.\r");
76+
77+
Thread.sleep(500);
78+
79+
System.out.print("+ Loading..\r");
80+
81+
Thread.sleep(500);
82+
83+
System.out.print("- Loading...\r");
84+
85+
Thread.sleep(500);
86+
87+
System.out.print("+ Loading\r");
88+
}
89+
catch (Exception e)
90+
{
91+
e.printStackTrace(System.err);
92+
}
93+
}
94+
}
95+
6996
public static void printSystemComponent(Object object, Integer hashcode, String line)
7097
{
7198
// Build the [Current: ...] field and pad the content inside the brackets to the desired total width

0 commit comments

Comments
 (0)