RT怎么设置TIME。scheduleAtFixedRate?

解决方案 »

  1.   

    Timer类的这样两个方法--
    1>延迟多长时间之后运行:
    schedule(TimerTask task, long delay) 
              Schedules the specified task for execution after the specified delay.
    2>在指定时间运行:
    schedule(TimerTask task, Date time) 
              Schedules the specified task for execution at the specified time.
      

  2.   

    只设置定时器的初始延时,而把它的重复属性设为flase。
      

  3.   

    你在定时器第一次执行后的代码后加上 定时器.cancel()