thanks, sleep不行,
只要能够计算一下时间就可以,
不知怎么计算?

解决方案 »

  1.   

    long start=System.currentTimeMillis();long end=System.currentTimeMillis();long time=end-start;
      

  2.   

    public class OneMin extends Thread {    public static final int Min = 60000;    public static volatile boolean notfinished = true;    public void run() {
    try {
    Thread.sleep(Min);
    } catch (InterruptedException e) {
    //todo
    }
    notfinished = false;
        }    public static void main(String[] args) {
            OneMin calculator = new OneMin();
    Calendar date = Calendar.getInstance();        calculator.start();
    int i = 0;
    while(notfinished) {
    System.out.println(i++);
    }
        }
    }
      

  3.   

    killme2008(Java-Dog) 
     的方法可以用一用的