/** * 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); }
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; }