This function is only executed one time here we perform checks if we
only need once per session.
337109
protected function _runOnce()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        //Ensures config values are available, database connection is established,
        //session is started, a possible SeoUrl is decoded, globals and environment variables are set.
        $config->init();

        error_reporting($this->_getErrorReportingLevel());

        $runOnceExecuted = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('blRunOnceExecuted');
        if (!$runOnceExecuted && !$this->isAdmin() && $config->isProductiveMode()) {
            // check if setup is still there
            if (file_exists($config->getConfigParam('sShopDir') . '/Setup/index.php')) {
                $tpl = 'message/err_setup.tpl';
                $activeView = oxNew(\OxidEsales\Eshop\Application\Controller\FrontendController::class);
                $smarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();
                $smarty->assign('oView', $activeView);
                $smarty->assign('oViewConf', $activeView->getViewConfig());
                \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit($smarty->fetch($tpl));
            }

            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('blRunOnceExecuted', true);
        }
    }
577906
def once(opts)
      o = @state.merge opts
      o[:time] = Time.now.to_i
      o[:tags] = ((o[:tags] | ["once"]) rescue ["once"])
      @client << o
    end
1042514
private boolean needsNewSession() {
        if (sessionCredentials == null) return true;

        long timeRemaining = sessionCredentialsExpiration.getTime() - System.currentTimeMillis();
        return timeRemaining < (this.refreshThreshold * 1000);
    }
622947
def loop_once
    return super if SqueezeHistory.disabled?
    begin
      input, last_input = history[-1], history[-2]
    rescue IndexError # EditLine is really broken, to_a is needed for it
      array = history.to_a
      input, last_input = array[-1], array[-2]
    end
    history.pop if input.to_s.strip == '' ||
                  (history.size > 1 && input == last_input)
    super
  end
7944
def _loop_once(self, timeout=None):
        
        _vv and IOLOG.debug('%r._loop_once(%r, %r)',
                            self, timeout, self.poller)
        #IOLOG.debug('readers =\n%s', pformat(self.poller.readers))
        #IOLOG.debug('writers =\n%s', pformat(self.poller.writers))
        for side, func in self.poller.poll(timeout):
            self._call(side.stream, func)
367409
private void onEnd()
   {
      long result = System.currentTimeMillis() - currentTime.get().poll();
      times.incrementAndGet();
      if (result < min.get())
      {
         min.set(result);
      }
      if (max.get() < result)
      {
         max.set(result);
      }
      total.addAndGet(result);
   }
596586
function once(f) {
    function g() {
      f.apply(this, arguments)
      remove(g) }
    add(g)
    return notify }
216401
public function useSession()
    {
        $this->session = $this->getRequest()->getAttribute('session');
        
        if (!isset($this->session)) {
            $this->session =& $_SESSION;
        }
    }
758914
def once(self):
        
        def check(): #pylint: disable=missing-docstring
            return super(SinonExpectation, self).calledOnce
        self.valid_list.append(check)
        return self
864386
def multi_session(self):
        '''  '''
        _val = 0
        if "multi_session" in self._dict:
            _val = self._dict["multi_session"]
            if str(_val).lower() == 'all':
                _val = -1

        return int(_val)
381330
def run(self, once=False):
        """"""
        self._once = once
        self.start()
        while self.running:
            try:
                time.sleep(1.0)
            except KeyboardInterrupt:
                self.stop()
                self.join()
1183616
private void clean(Instances cleanAgainst, Instances toClean, boolean onlyLast) {
		if (cleanAgainst.numInstances() > this.kOption.getValue() && toClean.numInstances() > 0){
			if (onlyLast){
				cleanSingle(cleanAgainst, (cleanAgainst.numInstances()-1), toClean);
			}else{
				for (int i=0; i < cleanAgainst.numInstances(); i++){
					cleanSingle(cleanAgainst, i, toClean);
				}
			}
		}
	}
351879
function init(){

    eventDataPairs = 0;
    currentSession = sessionManager.createSession();
    lastRequestTime = utils.getUnixTimeInSeconds();
    mediaPlaying = false;

    // checks if time since last request has exceeded the maximum request time
    if (timeSinceRequestChecker){

        clearInterval(timeSinceRequestChecker);
        timeSinceRequestChecker = null;

    }

    timeSinceRequestChecker = setInterval(
        () => {
            const currentTime = utils.getUnixTimeInSeconds();
            if (currentTime - lastRequestTime > config.getDataPostTimeInterval()){

                _createDataRequest();

            }
        }, 
        1000);

}
1071824
def _execute_phase_once(self, phase_desc, is_last_repeat):
    """"""
    # Check this before we create a PhaseState and PhaseRecord.
    if phase_desc.options.run_if and not phase_desc.options.run_if():
      _LOG.debug('Phase %s skipped due to run_if returning falsey.',
                 phase_desc.name)
      return PhaseExecutionOutcome(openhtf.PhaseResult.SKIP)

    override_result = None
    with self.test_state.running_phase_context(phase_desc) as phase_state:
      _LOG.debug('Executing phase %s', phase_desc.name)
      with self._current_phase_thread_lock:
        # Checking _stopping must be in the lock context, otherwise there is a
        # race condition: this thread checks _stopping and then switches to
        # another thread where stop() sets _stopping and checks
        # _current_phase_thread (which would not be set yet).  In that case, the
        # new phase thread will be still be started.
        if self._stopping.is_set():
          # PhaseRecord will be written at this point, so ensure that it has a
          # Killed result.
          result = PhaseExecutionOutcome(threads.ThreadTerminationError())
          phase_state.result = result
          return result
        phase_thread = PhaseExecutorThread(phase_desc, self.test_state)
        phase_thread.start()
        self._current_phase_thread = phase_thread

      phase_state.result = phase_thread.join_or_die()
      if phase_state.result.is_repeat and is_last_repeat:
        _LOG.error('Phase returned REPEAT, exceeding repeat_limit.')
        phase_state.hit_repeat_limit = True
        override_result = PhaseExecutionOutcome(openhtf.PhaseResult.STOP)
      self._current_phase_thread = None

    # Refresh the result in case a validation for a partially set measurement
    # raised an exception.
    result = override_result or phase_state.result
    _LOG.debug('Phase %s finished with result %s', phase_desc.name,
               result.phase_result)
    return result
373370
def run_once(func):
    

    def _inner(*args, **kwargs):
        if func.__name__ in CTX.run_once:
            LOGGER.info('skipping %s', func.__name__)
            return CTX.run_once[func.__name__]

        LOGGER.info('running: %s', func.__name__)
        result = func(*args, **kwargs)
        CTX.run_once[func.__name__] = result
        return result

    return _inner
497464
def twice(self):
        
        def check(): #pylint: disable=missing-docstring
            return super(SinonExpectation, self).calledTwice
        self.valid_list.append(check)
        return self
543650
def check_session(self):
        
        if self.session is None:
            if self.autosession:
                self.open_session()
            else:
                msg = "must open a session before modifying %s" % self
                raise RuntimeError(msg)