I have these lines of code setup to change a boolean to false after a period of one second. Unfortunately the code within this class does not appear to execute when the run button is pressed. What would be the best way to ensure that this is triggered with the run button is utilized?
public class Cooldown{
boolean Go=true;
public void run(){
if(Globals.cooldown==true){
try{
Thread.sleep(1000);
}
catch(InterruptedException e){
}
Globals.cooldown=false;
}
}
}

