public boolean compareAndSetState(int expected, int state) {
            return STATE_UPDATER.compareAndSet(this, expected, state);
        }
Calculate goal nanoTime from startTime and current tick number,
then wait until that goal has been reached.

@return Long.MIN_VALUE if received a shutdown request,
current time otherwise (with Long.MIN_VALUE changed by +1)
jraft-core/src/main/java/com/alipay/sofa/jraft/util/timer/HashedWheelTimer.java