Stop the timer and emit a nice log
15849
def stop(self) -> None:
        
        end_time = datetime.datetime.now()
        elapsed_time = end_time - self.start_time
        elapsed_seconds = elapsed_time.seconds
        hours, remainder = divmod(int(elapsed_seconds), 3600)
        minutes, seconds = divmod(remainder, 60)
        as_str = "%sh %sm %ss %dms" % (
            hours,
            minutes,
            seconds,
            elapsed_time.microseconds / 1000,
        )
        info("%s took %s" % (self.description, as_str))
487550
def on_timer(self):
        
        try:
            self.flush()
        except Exception as e:
            log.exception('Error while flushing: %s', e)
        self._set_timer()
1200350
def stop(self):
        """"""
        self.keep_listening = False
        # if threaded, kill threads before going down
        if hasattr(self, 'join'):
            self.join()
        self.log("Went down.")
        return True
807011
function stop() {
        if($this->timer) {
            self::$loop->cancelTimer($this->timer);
            $this->timer = null;
        }
        
        $this->emitter->removeListener($this->event, $this->listener);
        
        $errors = (array) ($this->options['errors'] ?? array());
        if(\in_array('max', $errors, true) && ($this->options['max'] ?? 0) > 0 && $this->bucket->count() < $this->options['max']) {
            $reject = $this->reject;
            $reject(new \RangeException('Collecting timed out (max not reached in time)'));
            return;
        }
        
        $resolve = $this->resolve;
        $resolve($this->bucket);
    }
403063
def stop(cls):
        
        main_log, cls.main_log = cls.main_log, StructuredLogger_usingStream(STDOUT)
        main_log.stop()
1026095
def stop(self):
        ''''''
        for key, value in self._configs.items():
            self._client.config_set(key, value)
        logs = self._client.execute_command('slowlog', 'get', 100000)
        current = {
            'name': None, 'accumulated': defaultdict(list)
        }
        for _, _, duration, request in logs:
            command = request[0]
            if command == 'slowlog':
                continue
            if 'eval' in command.lower():
                subcommand = request[3]
                self._timings['qless-%s' % subcommand].append(duration)
                if current['name']:
                    if current['name'] not in self._commands:
                        self._commands[current['name']] = defaultdict(list)
                    for key, values in current['accumulated'].items():
                        self._commands[current['name']][key].extend(values)
                current = {
                    'name': subcommand, 'accumulated': defaultdict(list)
                }
            else:
                self._timings[command].append(duration)
                if current['name']:
                    current['accumulated'][command].append(duration)
        # Include the last
        if current['name']:
            if current['name'] not in self._commands:
                self._commands[current['name']] = defaultdict(list)
            for key, values in current['accumulated'].items():
                self._commands[current['name']][key].extend(values)
939167
public static void stop() {
    final ILoggerFactory loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory();
    if (loggerFactory instanceof LoggerContext) {
      final LoggerContext context = (LoggerContext) loggerFactory;
      context.stop();
    }
    setup.getAndSet(false);
  }
358896
def stop(self):
        """"""
        if self.zap_socket:
            self.log.debug(
                'Stopping ZAP at {}'.format(self.zap_socket.LAST_ENDPOINT))
            super().stop()
1309469
public void stop_logging () {
   		Vector dl = Util.instance().get_device_list("*");
        for (Object aDl : dl) {
            ((DeviceImpl) aDl).stop_logging();
        }
    }
1048006
def stop(self):
		
		if WAppsGlobals.log is not None and WLogApp.__log_handler__ is not None:
			WAppsGlobals.log.removeHandler(WLogApp.__log_handler__)

		WLogApp.__log_handler__ = None
		WAppsGlobals.log = None
68228
def silence(self):
        

        sys.stdout = open(os.devnull, 'w')
        sys.stderr = open(os.devnull, 'w')
634011
private void closeOnSuccess() {

        Timer closeTimer = new Timer() {

            /**
             * @see com.google.gwt.user.client.Timer#run()
             */
            @Override
            public void run() {

                CmsSingleFileUploadDialog.this.hide();
            }
        };
        closeTimer.schedule(1000);
    }
1282709
function emit() {
  if (arguments.length) this.emitted.push(arguments);
  while (!this.paused && this.emitted.length && this.readable) {
    var emitArgs = this.emitted.shift();
    this.emit.apply(this, emitArgs);
    if (emitArgs[0] == 'end') {
      this.readable = false;
    }
  }
}
346703
def timer_fired(self):
        """"""
        self.__process_idle_events()

        # grab the simulation lock, gather all of the
        # wpilib objects, and display them on the screen
        self.update_widgets()

        # call next timer_fired (or we'll never call timer_fired again!)
        delay = 100  # milliseconds
        self.root.after(delay, self.timer_fired)
1168839
def _timing(f, logs_every=100):
  """"""
  @functools.wraps(f)
  def wrap(*args, **kw):
    """The timer function."""
    ts = _time.time()
    result = f(*args, **kw)
    te = _time.time()
    qj._call_counts[f] += 1
    qj._timings[f] += (te - ts)
    count = qj._call_counts[f]
    if count % logs_every == 0:
      qj(x='%2.4f seconds' % (qj._timings[f] / count),
         s='Average timing for %s across %d call%s' % (f, count, '' if count == 1 else 's'), _depth=2)
    return result
  return wrap
919098
def stop(self):
		

		logger.debug("Stopping playback")
		# Stop the clock
		self.clock.stop()
		# Set plauyer status to ready
		self.status = READY
935395
def log(msg, delay=0.5, chevrons=True, verbose=True):
    """"""
    if verbose:
        if chevrons:
            click.echo("\n❯❯ " + msg)
        else:
            click.echo(msg)
        time.sleep(delay)