@Override public void run() { log.trace("Starting timer..."); long now = System.currentTimeMillis(); ConcurrentMap<TimerKey, BaseAction[]> tickedExecutors = timerExecutors.get((int) ((now / 1000) % 86400)); if (tickedExecutors == null) { return; } try { this.activeTimers = 0; this.actuallySendTimers = 0; send(tickedExecutors, now); } catch (Exception e) { log.error("Error running timers. ", e); } if (activeTimers > 0) { log.info("Timer finished. Ready {}, Active {}, Actual {}. Processing time : {} ms", tickedExecutors.size(), activeTimers, actuallySendTimers, System.currentTimeMillis() - now); } }