long (long delay) { Delayed head = delayQueue.peek(); if (head != null) { long headDelay = head.getDelay(TimeUnit.NANOSECONDS); if (headDelay < 0 && delay - headDelay < 0) { delay = Long.MAX_VALUE + headDelay; } } return delay; }