Can someone please help me? I have this java program that needs to perform a task every minute of the computer's clock.
May I know if this is possible, and if yes what is the best way to do this?
Thank you very much!
Can someone please help me? I have this java program that needs to perform a task every minute of the computer's clock.
May I know if this is possible, and if yes what is the best way to do this?
Thank you very much!
You may try this:
int delay = 60000;   // delay for 1 min.
int period = 5000;  // repeat every 5 sec.
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
        public void run() {
            // Task here ...
        }
    }, delay, period);