Code example for Stopwatch

    public FollowerLogInformationImpl(String id, AtomicLong nextIndex,
        AtomicLong matchIndex, FiniteDuration followerTimeoutDuration) { = id;
        this.nextIndex = nextIndex;
        this.matchIndex = matchIndex;
        this.stopwatch = new Stopwatch();
        this.followerTimeoutMillis = followerTimeoutDuration.toMillis();
    public long incrNextIndex(){ 
        return nextIndex.incrementAndGet();
    @Override public long decrNextIndex() { 
        return nextIndex.decrementAndGet();
    @Override public void setNextIndex(long nextIndex) {
Connect your IDE to all the code out there  Get Codota for Java