The boolean done will be changed to true instantly, while the timer task is still executing. I can't change it from within the timer task because it would have to be declared final. How can I change the done to true from inside, or after the timer reaches a certain point?Code:boolean done = false;
Timer t = new Timer();
t.schedule(new TimerTask() {
@Override public void run() {
//task
}
},0, 1000);
done = true;
