예제 #1
0
파일: Timer.php 프로젝트: bankiru/yii-pinba
 /**
  * Deletes the timer.
  *
  * @param resource $timer valid timer resource.
  * @return bool Returns true on success and false on failure.
  */
 public static function delete($timer)
 {
     if (!self::isEnabled()) {
         return;
     }
     return pinba_timer_delete($timer);
 }
예제 #2
0
 public function timerDelete($name)
 {
     if (!array_key_exists($name, $this->timers)) {
         throw new WrongArgumentException('have no any timer with name ' . $name);
     }
     pinba_timer_delete($this->timers[$name]);
     unset($this->timers[$name]);
     return $this;
 }