c3 a9quivalent settimeinterval java

Solutions on MaxInterview for c3 a9quivalent settimeinterval java by the best coders in the world

showing results for - " c3 a9quivalent settimeinterval java"
Romane
01 Feb 2018
1// Param is optional, to run task on UI thread.     
2Handler handler = new Handler(Looper.getMainLooper());
3Runnable runnable = new Runnable() {
4    @Override
5    public void run() {
6        // Do the task...
7        handler.postDelayed(this, milliseconds) // Optional, to repeat the task.
8    }
9};
10handler.postDelayed(runnable, milliseconds);
11
12// Stop a repeating task like this.
13handler.removeCallbacks(runnable);