src/bbn/util/timer.php
public function stop($key='default')
  {
    if ( isset($this->measures[$key], $this->measures[$key]['start']) ){
      $this->measures[$key]['num']++;
      $time = $this->measure($key);
      $this->measures[$key]['sum'] += $time;
      unset($this->measures[$key]['start']);
      return $time;
    }
    else{
      die("Missing a start declaration for timer $key");
    }
  }
public function stop($key='default')
  {
    if ( isset($this->measures[$key], $this->measures[$key]['start']) ){
      $this->measures[$key]['num']++;
      $time = $this->measure($key);
      $this->measures[$key]['sum'] += $time;
      unset($this->measures[$key]['start']);
      return $time;
    }
    else{
      die("Missing a start declaration for timer $key");
    }
  }
public function stop ( $ key = 'default' ) { if ( isset ( $ this -> measures [ $ key ] , $ this -> measures [ $ key ] [ 'start' ] ) ) { $ this -> measures [ $ key ] [ 'num' ] ++ ; $ time = $ this -> measure ( $ key ) ; $ this -> measures [ $ key ] [ 'sum' ] += $ time ; unset ( $ this -> measures [ $ key ] [ 'start' ] ) ; return $ time ; } else { die ( "Missing a start declaration for timer $key" ) ; } }
Stops a timer for a given key

@return int
Stops a timer for a given key