The list of methods to do Timer Usage are organized into topic(s).
Timer
getMinIdleTimer() Get the
Timer for checking keyedPool's idle count.
if (MIN_IDLE_TIMER == null) {
MIN_IDLE_TIMER = new Timer(true);
return MIN_IDLE_TIMER;
Timer
getQuickSearchTimer() get Quick Search Timer
if (quickSearchTimer == null) {
quickSearchTimer = new Timer("QuickSearchTimer", true);
return quickSearchTimer;
Timer
getSlowTimer() get Slow Timer
synchronized (TIMER_LOCK) {
if (timerslow == null) {
timerslow = new Timer();
return timerslow;
Timer
getTimer(String id) get Timer
Timer timer = timerById.get(id);
if (null == timer) {
timer = new Timer(true);
timerById.put(id, timer);
return timer;
boolean
mayNewTasksBeScheduled(Timer timer) Checks whether new tasks can be scheduled, that is whether the time thread is still active.
try {
timer.schedule(null, 0);
} catch (IllegalStateException ex) {
return false;
} catch (NullPointerException ex) {
return true;
return true;
...
void
printLoadToConsole(int milliOffset) Prints a spinning icon to the console
loading = true;
final Timer t = new Timer();
TimerTask task = new TimerTask() {
int loop = 0;
public void run() {
if (loading) {
loop++;
if (loop == 1) {
...
void
runRotateKeys() run Rotate Keys
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
System.out.println("Rotating keys...");
}, 2 * 60 * 1000, 2 * 60 * 1000);