is there a way to time a certain method, like if you want something to happen at a certain time?


if (timer > 0) { timer--; if (timer == 0) methodName(); }
private void checkTimer() { if (timer == 0) return; // the timer is not in use timer--; if (timer == 0) methodName(); }
timer--; if (timer == 0) methodName();
if (System.currentTimeMillis() - timer >= 1000) { timer = 0; methodName(); }