Stop the timer and send the total since `start()` was run

        :keyword subname: The subname to report the data to (appended to the
            client name)
        :type subname: str
177373
def stop(self, subname='total'):
        '''
        '''
        assert self._stop is None, (
            'Unable to stop, the timer is already stopped')
        self._stop = time.time()
        return self.send(subname, self._stop - self._start)
951743
def run(self):
        
        elapsed = 0
        run_time = self.config['run_time']
        start_time = time.time()
        t = time.time
        self.turrets_manager.start(self.transaction_context)
        self.started = True

        while elapsed <= run_time:
            try:
                self._run_loop_action()
                self._print_status(elapsed)
                elapsed = t() - start_time
            except (Exception, KeyboardInterrupt):
                print("\nStopping test, sending stop command to turrets")
                self.turrets_manager.stop()
                self.stats_handler.write_remaining()
                traceback.print_exc()
                break

        self.turrets_manager.stop()
        print("\n\nProcessing all remaining messages... This could take time depending on message volume")
        t = time.time()
        self.result_collector.unbind(self.result_collector.LAST_ENDPOINT)
        self._clean_queue()
        print("took %s" % (time.time() - t))
146734
def _handle_subscribed(self, *args,  chanId=None, channel=None, **kwargs):
        
        log.debug("_handle_subscribed: %s - %s - %s", chanId, channel, kwargs)
        if chanId in self.channels:
            raise AlreadyRegisteredError()

        self._heartbeats[chanId] = time.time()

        try:
            channel_key = ('raw_'+channel
                           if kwargs['prec'].startswith('R') and channel == 'book'
                           else channel)
        except KeyError:
            channel_key = channel

        try:
            self.channels[chanId] = self._data_handlers[channel_key]
        except KeyError:
            raise UnknownChannelError()

        # prep kwargs to be used as secondary value in dict key
        try:
            kwargs.pop('event')
        except KeyError:
            pass

        try:
            kwargs.pop('len')
        except KeyError:
            pass

        try:
            kwargs.pop('chanId')
        except KeyError:
            pass

        self.channel_labels[chanId] = (channel_key, kwargs)
50040
def send_stop_signal(self, silent=False):
        
        if self.is_running():
            self._stop_signal = True
        elif not silent:
            raise RuntimeError('Loop is currently not running')
371710
def stop(self, timeout = 10.0):
		
		if (self._send_greenlet is not None) and \
				(self._send_queue.qsize() > 0):
			self.wait_send(timeout = timeout)

		if self._send_greenlet is not None:
			gevent.kill(self._send_greenlet)
			self._send_greenlet = None
		if self._error_greenlet is not None:
			gevent.kill(self._error_greenlet)
			self._error_greenlet = None
		if self._feedback_greenlet is not None:
			gevent.kill(self._feedback_greenlet)
			self._feedback_greenlet = None

		return self._send_queue.qsize() < 1
555961
function () {
            this._handler = $B.bind(function (e) {
                ++this._count;
                this.dispatch( 'timer', {target: this, currentCount: this._count, data: this._data} );
                if ( this._repeatCount > 0 && this._repeatCount == this._count ) {
                    this.stop();
                    this.dispatch( 'complete', {target: this, currentCount: this._count, data: this._data} );
                }
            }, this);
        }
368285
def send(self, subname, value):
        '''
        '''
        assert isinstance(value, compat.NUM_TYPES)
        return self._send(subname, value)
1145179
def _mark_started(self):
        
        log = self._params.get('log', self._discard)

        now = time.time()
        self._started = now

        limit = self._config_running.get('time_limit')
        try:
            limit = float(_fmt_context(self._get(limit, default='0'), self._context))
            if limit > 0:
                log.debug("Applying task '%s' time limit of %s", self._name, deltafmt(limit))
                self._limit = now + limit
        except Exception as e:
            log.warn("Task '%s' time_limit value '%s' invalid -- %s",
                self._name, limit, e, exc_info=log.isEnabledFor(logging.DEBUG))
666561
def stop(self):
        
        if not self._timer.isActive():
            return

        self._elapsed += self._delta
        self._timer.stop()
884857
def timerEvent(self, event):
        
        if event.timerId() == self._hide_timer.timerId():
            self._hide_timer.stop()
            self.hide()
1200100
@Override
  public void onTimer(String timerName) {
    if (timerName.equals(IDLE_SESSION_TIMER_NAME)) {
      checkIdleAppSession();
    }
    else if (timerName.equals(TIMER_NAME_TS)) {
      try {
        sendAndStateLock.lock();
        sessionData.setTsTimerId(null);
        handleEvent(new Event(TIMEOUT_EXPIRES, null));
      }
      catch (Exception e) {
        logger.debug("Can not handle event", e);
      }
      finally {
        sendAndStateLock.unlock();
      }
    }
    else {
      logger.warn("Received an unknown timer '{}' for Session-ID '{}'", timerName, getSessionId());
    }
  }
1328335
def stop(self):
        
        if not self._running:
            return
        self._weight_subscriber.unregister()
        self._running = False
361146
def run(self, limit=None, timeout=None):
        
        counter = 0
        self.stream = sseclient.SSEClient(self.endpoint)
        while True:
            with utils.Timeout(timeout):
                try:
                    event = next(self.stream)
                except StopIteration:
                    continue
                else:
                    if not event.data:
                        continue
                    self.main_callback(event.data)
                    counter += 1
                    if limit and counter >= limit:
                        return
258403
def main_loop(self, timeout=None):
        
        if self.trigger_event.wait(timeout):
            try:
                self.func()
            except Exception as e:
                self.logger.warning("Got an exception running {func}: {e}".format(func=self.func, e=str(e)))
            finally:
                self.trigger_event.clear()
367848
def stop_subscribe(self):
        
        asyncio.gather(*asyncio.Task.all_tasks()).cancel()
        self.event_loop.stop()
        self.event_loop.close()
565070
def end_timing(self, name, elapsed):
        
        for counter in self._counters:
            if isinstance(counter, ITimingCallback):
                counter.end_timing(name, elapsed)
1365353
def stop(self):
        
        if ( self.dev == None ): return ''
        buf = [REPORT_ID, ord('p'), 0, 0, 0, 0, 0, 0, 0]
        return self.write(buf);