
import java.text.SimpleDateFormat;
public class TestTime {
static int x = 0;
public static String time(){
SimpleDateFormat Df = new SimpleDateFormat("ss");
String df = Df.format(new java.util.Date());
x = 2 ;
System.out.println(df);
return df;
}
public static void main(String[] args) {
String df = time();
int t = Integer.parseInt(df);
System.out.println(t);
while(true){
SimpleDateFormat Df = new SimpleDateFormat("ss");
df = Df.format(new java.util.Date());
int t2 = Integer.parseInt(df);
System.out.println("t:"+t);
System.out.println("t2:"+t2);
if(t2-t >= 1){
if(x == 1){
x = 2;
}
break;
}
}
System.out.println("X:"+x);
}
}