I need to implement a function to run after 60 seconds of clicking a button. Please help, I used the Timer class, but I think that that is not the best way.
public ScheduledExecutorService = ses; ses.scheduleAtFixedRate(new Runnable(){ run(){ //running after specified time } }, 60, TimeUnit.SECONDS);
its run after 60 seconds from scheduleAtFixedRate https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html