看代码时候发现有些核查采用如下

    1. Preconditions.checkState(timeDifferenceMilliseconds < getMaxTolerateTimeDifferenceMilliseconds(),
    2. "Clock is moving backwards, last time is %d milliseconds, current time is %d milliseconds", lastMilliseconds, currentMilliseconds);

    image.png

    这个是guava包中的工具用法,还是很不错的