@Override
  public long currentTime() {
    for (long current;;) {
      current = System.currentTimeMillis();
      long prev = prevTime.get();
      if (current <= prev) {
        current = prev + 1;
      }
      if (prevTime.compareAndSet(prev, current)) {
        return current;
      }
    }
  }
An clock which will never return the same clock twice.
hbase-common/src/test/java/org/apache/hadoop/hbase/util/NonRepeatedEnvironmentEdge.java