thanks  songlean(乐乐) ,
能不能写个例子

解决方案 »

  1.   


    public class TimeListenerTest extends Thread {
    private int m_time;
    public static void main(String[] args) {
        TimeListenerTest t = new TimeListenerTest();
           t.start();
    }
    public void run() {
    try {
    while (!interrupted()) {
    m_time++;
    sleep(1000);
    if (m_time > 12 * 60 * 60) {
    System.exit(0);
    }
    }
    } catch(InterruptedException e) {}
    }
    }