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");
    }
  }