stops the watch

@return returns the current time or 0 if watch not was running
481033
public long stop() {
	if (isRunning) {
	    long time = _time() - start;
	    total += time;
	    count++;
	    isRunning = false;
	    return time;

	}
	return 0;
    }
718783
private static Stopwatch getRecentRunning(final Stopwatch parent) {
        if (null == parent) {
            return null;
        }

        final List<Stopwatch> leaves = parent.getLeaves();

        if (leaves.isEmpty()) {
            if (parent.isRunning()) {
                return parent;
            } else {
                return null;
            }
        }

        for (int i = leaves.size() - 1; i > -1; i--) {
            final Stopwatch leaf = leaves.get(i);

            if (leaf.isRunning()) {
                return getRecentRunning(leaf);
            } else {
                continue;
            }
        }

        return parent;
    }
384734
public boolean stop() {
        if (!this.isTailing.get()) {
            LogWatchTailingManager.LOGGER.debug("Tailer not running, therefore not terminating.");
            return false;
        }
        /*
         * terminate tailer; we stop the scheduler and the task will therefore
         * never be started again
         */
        this.tailer.stop();
        LogWatchTailingManager.LOGGER.info("Terminated tailing #{} for {}.",
                this.numberOfTimesThatTailerWasStarted.get(), this.watch);
        return true;
    }
385376
function startWatch() {
        if (watcher) return

        watcher = setInterval(function() {
            if (self.root[self.origin.offset]) {
                stopWatch()
                self.update()
            }
        }, 300) // is it good enought for you?)
    }
891045
public long done() {
    if (enabled) {
      if (!done) {
        lastCheckpointNanos = System.nanoTime();
        done = true;
      }
      return lastCheckpointNanos - startNanos;
    }
    return -1;
  }
428693
def stop(self) -> None:
        
        if not self._running:
            return

        self._running = False
        self._receiving_queue.put_nowait((TRANSPARENT_EVENT, None))
        self._internal_queue.put_nowait((TRANSPARENT_EVENT, None))
1007213
@SuppressWarnings({"unused", "WeakerAccess"})
    public int getTimeElapsed() {
        int currentSession = getCurrentSession();
        if (currentSession == 0) return -1;

        int now = (int) (System.currentTimeMillis() / 1000);
        return now - currentSession;
    }
351105
public Stopwatch stop() {
    long tick = ticker.read();
    Assert.isTrue(isRunning);
    isRunning = false;
    elapsedNanos += tick - startTick;
    return this;
  }
1062353
public int execute()
    {
        int executed = 0;
        final long now = now();
        for (Entry<Timer, Long> entry : entries()) {
            final Timer timer = entry.getKey();
            final Long expiration = entry.getValue();

            //  Dead timer, lets remove it and continue
            if (!timer.alive) {
                //  Remove it from the list of active timers.
                timers.remove(expiration, timer);
                continue;
            }
            //  Map is ordered, if we have to wait for current timer we can stop.
            if (expiration - now > 0) {
                break;
            }

            insert(timer);

            timer.handler.time(timer.args);
            ++executed;
        }
        return executed;
    }
756038
public Stopwatch start() {
    Assert.isTrue(!isRunning);
    isRunning = true;
    startTick = ticker.read();
    return this;
  }
1237767
def stop(self):
        
        if self._done_event.is_set():
            # Stop event set: we're stopped
            return

        # Set the stop event
        self._done_event.set()

        with self.__lock:
            # Add something in the queue (to unlock the join())
            try:
                for _ in self._threads:
                    self._queue.put(self._done_event, True, self._timeout)
            except queue.Full:
                # There is already something in the queue
                pass

            # Copy the list of threads to wait for
            threads = self._threads[:]

        # Join threads outside the lock
        for thread in threads:
            while thread.is_alive():
                # Wait 3 seconds
                thread.join(3)
                if thread.is_alive():
                    # Thread is still alive: something might be wrong
                    self._logger.warning(
                        "Thread %s is still alive...", thread.name
                    )

        # Clear storage
        del self._threads[:]
        self.clear()
610963
public Result execute() {
        long start = clock().getTick();
        Result result;
        try {
            result = check();
        } catch (Exception e) {
            result = Result.unhealthy(e);
        }
        result.setDuration(TimeUnit.MILLISECONDS.convert(clock().getTick() - start, TimeUnit.NANOSECONDS));
        return result;
    }
1367952
public function stop()
  {
    $this->end = microtime(true);
    return bcsub($this->end, $this->start, 2);
  }
53455
public void stop() throws IllegalStateException {
        if (!this.running) {
            throw new IllegalStateException("Can't stop StopWatch: it's not running");
        }

        if(!runningTasks.isEmpty()) {

            TaskInfo lastTask = runningTasks.pop();
            lastTask.stop();
            taskList.add(lastTask);
            this.currentTaskName = null;
            this.totalTimeMillis += lastTask.getTimeMillis();
        }
    }
1367152
public function stop()
    {
        $time = (int) round((microtime(true) - $this->time) * 1000);

        $this->time = null;

        return $time;
    }
83288
public synchronized void stop() {

        if (m_thread != null) {
            long timeBeforeShutdownWasCalled = System.currentTimeMillis();
            JLANServer.shutdownServer(new String[] {});
            while (m_thread.isAlive()
                && ((System.currentTimeMillis() - timeBeforeShutdownWasCalled) < MAX_SHUTDOWN_WAIT_MILLIS)) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    // ignore
                }
            }
        }

    }
947690
def stop(self, timeout: int = 5) -> None:
        
        self.running = False
        start = time.perf_counter()
        while True:
            if self.getsCounter == 0:
                return True
            elif time.perf_counter() <= start + timeout:
                time.sleep(.1)
            else:
                raise StopTimeout("Stop timed out waiting for {} gets to "
                                  "complete.".format(self.getsCounter))