@Override
    public long getDelay(final TimeUnit unit) {
        long millis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
        return unit.convert(Math.max(getExpiration() - millis, 0), TimeUnit.MILLISECONDS);
    }
Traversing using this is thread-safe.

@param consumer the consumer
shenyu-common/src/main/java/org/apache/shenyu/common/timer/TimerTaskList.java