My requirement is my java code should execute for every 5 seconds until for one minute. My code should start running every 5 seconds after completion of 1 minute it should stop executing that means my code should execute 12 times and it should stop. I tried with java util Timer and TimerTask with the help of this example... but it dent satisfy my requirement it has the functionality just to execute every 5 seconds but it dosen't have the functionality to terminate execution after one minute...
Any suggestion will be helpful Thanks You...