how can i put a timer/timeout so that whenever a method is executed, there should be like 1 minute before it can be executed again. Example
if (A>B){
Toast.makeText(getApplicationContext(), "Text HERE", Toast.LENGTH_SHORT).show();
}
I dont want the toast to be spammed. So that if the condition is always satisfied, it will only show the toast every 1 minute.
Thanks!