Stops the stopwatch. Future reads will return the fixed duration that had
elapsed up to this point.

@return this {@code Stopwatch} instance
@throws IllegalStateException if the stopwatch is already stopped.
351105
public Stopwatch stop() {
    long tick = ticker.read();
    Assert.isTrue(isRunning);
    isRunning = false;
    elapsedNanos += tick - startTick;
    return this;
  }
939398
public I collapse() {

        if (this.start.isInfinite()) {
            throw new IllegalStateException(
                "An interval with infinite past cannot be collapsed.");
        }

        T t = this.getClosedFiniteStart();
        Boundary<T> s = Boundary.ofClosed(t);
        Boundary<T> e = Boundary.ofOpen(t);
        return this.getFactory().between(s, e);

    }
1168788
public synchronized void stop()
  {
    running.set(false);
    if(thread.isAlive()) {
      thread.interrupt();
      wait(this, STOP_TIMEOUT);
    }
  }
881393
public AttemptTimelimit<R> getTimelimiter() {
        return this.tryTimeout = (null == this.tryTimeout ? new AttemptTimelimit<R>() {
            //An implementation which actually does not attempt to limit time at all
            @Override public R call(Callable<R> callable) throws Exception {
                return checkNotNull(callable).call();
            }
        } : this.tryTimeout);
    }
590762
T getTemporalOfOpenEnd() {

        T temporal = this.end.getTemporal();

        if (temporal == null) {
            throw new UnsupportedOperationException(
                "An infinite interval has no finite duration.");
        } else if (this.end.isClosed()) {
            return this.getTimeLine().stepForward(temporal);
        } else {
            return temporal;
        }

    }
958443
public synchronized void stop() {
        if (state != State.STOPPED) {
            nanoTimeStop = System.nanoTime();
            state = State.STOPPED;
        }
    }
1323689
public StopWatch freeze()
    {
        StopWatch sw = new StopWatch( m_tag, m_message);
        sw.m_startNanos = m_startNanos;
        sw.m_stopNanos = m_stopNanos != 0 ? m_stopNanos : System.nanoTime();
        sw.m_creation = m_creation;
        sw.m_count = m_count;
        return sw;
    }
926672
public void stop() {
        try {
            Stopwatch watch = Stopwatch.createStarted();
            stopAsync();
            log.info("Awaiting PeerGroup shutdown ...");
            executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS);
            log.info("... took {}", watch);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
715999
public TimeCounter stop() {
        switch (state) {
            case UNSTARTED:
                throw new IllegalStateException("Not started. ");
            case STOPPED:
                throw new IllegalStateException("Already stopped. ");
            case RUNNING:
                watch.suspend();
        }
        state = State.STOPPED;
        return this;
    }
1255607
public Stopwatch stopAfter(final int aSecondsCount) {
        if (!myTimerIsRunning) {
            throw new IllegalStateException(LOGGER.getI18n(MessageCodes.UTIL_041));
        }

        int stopCount = aSecondsCount;

        while (stopCount < aSecondsCount) {
            stopCount = (int) (System.currentTimeMillis() - myStart) / 1000;
        }

        myStop = System.currentTimeMillis();
        myTimerIsRunning = false;

        return this;
    }
630500
@Write(consumes = {})
    public Object stop() {
        try {
            return message;
        } finally {
            Thread thread = new Thread(this::stopServer);
            thread.setContextClassLoader(getClass().getClassLoader());
            thread.start();
        }
    }
1223511
public void stop() throws IllegalStateException {
		if (!this.running) {
			throw new IllegalStateException("Can't stop StopWatch: it's not running");
		}
		long lastTime = System.currentTimeMillis() - this.startTimeMillis;
		this.totalTimeMillis += lastTime;
		this.lastTaskInfo = new TaskInfo(this.currentTaskName, lastTime);
		if (this.keepTaskList) {
			this.taskList.add(lastTaskInfo);
		}
		++this.taskCount;
		this.running = false;
		this.currentTaskName = null;
	}
481033
public long stop() {
	if (isRunning) {
	    long time = _time() - start;
	    total += time;
	    count++;
	    isRunning = false;
	    return time;

	}
	return 0;
    }
654469
public long stopTimer(String name) {
        StopWatch sw = getStopWatch(name);
        sw.stop();
        STOP_WATCHES.remove(name);
        return sw.getTime();
    }
639391
public void stop()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "stop");

    synchronized (this)
    {
      active = false;
      // stop the liveness timer for sending ControlRequestHighestGeneratedTick, if needed

      //NOTE: the requestHighestGeneratedTickTimer will stop of its own accord once the
      //stream is noticed to be

      if (initRepeatHandler != null)
      {
        initRepeatHandler.cancel();
      }
      if (inactivityTimer != null)
      {
        inactivityTimer.cancel();
        inactivityTimer = null;
      }
      if (resetRequestAckSender != null)
      {
        resetRequestAckSender.stop();
      }
      // stop all the liveness timers for value ticks
      dem.stopTimer();
      if (imeRestorationHandler!=null)
        imeRestorationHandler.stopTimer();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "stop");
  }
600087
public StopWatch stop( String tag, String message )
    {
        m_tag = tag;
        m_message = message;
        stop();

        return this;
    }
943700
public MockServerClient stop(boolean ignoreFailure) {
        MockServerEventBus.getInstance().publish(EventType.STOP);
        try {
            sendRequest(request().withMethod("PUT").withPath(calculatePath("stop")));
            if (isRunning()) {
                for (int i = 0; isRunning() && i < 50; i++) {
                    TimeUnit.MILLISECONDS.sleep(5);
                }
            }
        } catch (RejectedExecutionException ree) {
            mockServerLogger.trace("Request rejected because closing down but logging at trace level for information just in case due to some other actual error " + ree);
        } catch (Exception e) {
            if (!ignoreFailure) {
                mockServerLogger.warn("Failed to send stop request to MockServer " + e.getMessage());
            }
        }
        if (!eventLoopGroup.isShuttingDown()) {
            eventLoopGroup.shutdownGracefully();
        }
        return clientClass.cast(this);
    }