I’m newbe in Java programming and I want to know what the following code do:
did it execute the setUp function every 1000 milllisecond without stop ?
handler.postDelayed(new Runnable() {
public void run() {
setUp();
}
}, 1000);
no, it will run it with a 1000ms delay.
Also, that looks like android 😉 If you want to get a call every second use a TimerTask instead. http://docs.oracle.com/javase/1.4.2/docs/api/java/util/TimerTask.html