package art.servers.colorsserver.M.protocol;
|
|
import java.util.Calendar;
|
|
public class Test extends Thread
|
{
|
public void run()
|
{
|
while (true)
|
{
|
try
|
{
|
Calendar calendar = Calendar.getInstance();
|
calendar.setTimeInMillis(System.currentTimeMillis());
|
if ((calendar.get(Calendar.HOUR_OF_DAY) == 0) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 1) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 2) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 3) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 4) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 5) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 6) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 7) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 8) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 14) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
else if ((calendar.get(Calendar.HOUR_OF_DAY) == 20) && (calendar.get(Calendar.MINUTE) == 0))
|
{
|
System.exit(0);
|
}
|
}
|
catch (Exception e)
|
{
|
|
}
|
finally
|
{
|
try{sleep(30000);} catch (Exception e){};
|
}
|
}
|
}
|
}
|