1
2
3
4
5
public TimerTask myTimer = new TimerTask() {
    public void run() {
        Log.d("neo", "run timer");
    }
};

1
2
timer = new Timer();
timer.schedule(myTimer, 500, 1000);


public void schedule (TimerTask task, long delay, long period)

timer.schedule 설명
TimerTask : 작업할 내용
delay : 몇 ms 후에 호출할 것인지
period : 몇 ms 간격으로 호출한것인지

[원문]
task the task to schedule.
delay amount of time in milliseconds before first execution.
period amount of time in milliseconds between subsequent executions.
Posted by 암리타 :