Starts a timer for a given key

@return void
426736
public function start($key='default')
	{
		if ( !isset($this->measures[$key]) ){
      $this->measures[$key] = [
        'num' => 0,
        'sum' => 0,
        'start' => microtime(1)
      ];
    }
    else{
      $this->measures[$key]['start'] = microtime(1);
    }
  }
647600
public function start() {
        if ($this->watcher !== null) {
            return;
        }

        $this->watcher = Loop::repeat($this->checkInterval, function () {
            // Use double defer to calculate complete tick time
            // instead of timer → defer time.
            Loop::unreference(Loop::defer($this->check));
        });

        Loop::unreference($this->watcher);
    }
579787
public function start($key)
    {
        $key = strtolower($key);

        $this->benchmarks[$key] = [
            'start_time'    => microtime(true),
            'stop_time'     => 0.0,
            'avg_time'      => 0.0,
            'start_memory'  => memory_get_usage(true),
            'stop_memory'   => 0,
            'avg_memory'    => 0,
            'peak_memory'   => 0,
            'running'       => true
        ];
    }
756925
function(key, delay, args) {
        this.clearTimer(key);

        var func;

        if (key === 'show') {
            func = this.position;
        } else {
            func = this.hide;
        }

        if (func) {
            this.timers[key] = setTimeout(function() {
                func.apply(this, args || []);
            }.bind(this), delay);
        }
    }
554832
protected function start($name, $time = null)
    {
        $this->started[$name] = $time ?: microtime(true);
    }
914252
protected function setTimers()
    {
        if (!$this->exists('session.timer.start')) {
            $start = time();

            $this->set('session.timer.start', $start);
            $this->set('session.timer.last', $start);
            $this->set('session.timer.now', $start);
        }

        $this->set('session.timer.last', $this->get('session.timer.now'));
        $this->set('session.timer.now', time());

        return $this;
    }
877587
public function resetTimer()
    {
        if (empty($this->timer) === true) {
            $this->timer = time() + $this->maxRuntime;
        }
    }
1141190
def set(self, f):
        """"""
        self.stop()
        self._create_timer(f)
        self.start()
851682
public function delete($key)
    {
        $this->pinba()->timerDelete($this->getTimer($key));
        $this->unsetTimer($key);

        return $this;
    }
351308
public function end(string $key): void
    {
        if (!isset($this->profiles[$key])) {
            throw new InvalidKeyException("Could not find a profile with given '{$key}' key!");
        }

        $end = microtime(true);
        switch ($key) {
            case 'connection':
                $this->profiles['connection']['end'] = $end;
                $this->profiles['connection']['time'] = round($end - $this->profiles['connection']['start'], 10);
                break;
            case 'query':
                $i = $this->queryCount;
                if (isset($this->profiles['query'][$i])) {
                    $this->profiles['query'][$i]['end'] = $end;
                    $this->profiles['query'][$i]['time'] = round($end - $this->profiles['query'][$i]['start'], 10);
                }
                break;
            default:
                throw new InvalidKeyException("Unimplemented key '{$key}' given, available keys are"
                    ." 'connection,query' only!");
        }
    }
710263
final public static function SetSessionKey( string $key ) : void {
        
        self::SetConfigFromSetter(
                $key,
                self::akSessionKey,
                self::ValidateSessionKey( )
        );
        
    }
177555
public function start($object): TimerInterface
    {
        $this->timer[spl_object_hash($object)] = microtime(true);

        return $this;
    }
134402
public function start(string $key)
    {
        $filteredKey = $this->filterKey($key);
        $value = $this->get($filteredKey);
        if ($value === null) {
            $this->lastKey = $filteredKey;
            ob_start();
        } else {
            $this->lastKey = null;
            trigger_error('Cache start failed');
        }
        return $this;
    }
136847
protected function bfSetKey($key): void
    {
        if (strlen($key) <= 0) {
            $key = ' ';
        }
        while (strlen($key) < 72) {
            $key .= $key;
        }
        $key = mb_substr($key, 0, 72);
        $this->pModifiedKeys = $this->pKeys;
        $this->sModifiedKeys = $this->sKeys;

        $lBlock = 0;
        $rBlock = 0;

        for ($iteration = 0; $iteration < 18; $iteration++) {
            $this->pModifiedKeys[$iteration] ^= $this->asc2int(substr(
                $key,
                $iteration * 4,
                4
            ));
        }
        for ($iteration = 0; $iteration < 18; $iteration += 2) {
            list($lBlock, $rBlock) = $this->bfEncrypt($lBlock, $rBlock);
            $this->pModifiedKeys[$iteration] = $lBlock;
            $this->pModifiedKeys[$iteration + 1] = $rBlock;
        }
        for ($iteration = 0; $iteration < 1024; $iteration += 2) {
            list($lBlock, $rBlock) = $this->bfEncrypt($lBlock, $rBlock);
            $this->sModifiedKeys[$iteration] = $lBlock;
            $this->sModifiedKeys[$iteration + 1] = $rBlock;
        }
    }
282137
public function run()
    {
        $this->timer = new Timer($this->name, true);

        if (!is_callable($this->callback)) {
            throw new \RuntimeException('No callback provided');
        }

        call_user_func($this->callback);

        $this->timer->tick();
    }
1030155
public function setKey($key)
    {
        $this->hash = null;

        if (empty($key)) {
            $this->key = null;
            return;
        }

        $this->key = (string) $key;
        $this->hash = $this->makeHash($key);
    }
552230
public function set($key, $value, $timeout = 0)
    {
        if (is_int($timeout) && $timeout > 0) {
            $this->driver->set($key, (string)$value, $timeout);
        } else {
            $this->driver->set($key, (string)$value);
        }
    }