PHPDaemon\Core\Timer::remove PHP Method

remove() public static method

Removes timer by ID
public static remove ( integer | string $id ) : void
$id integer | string Timer ID
return void
    public static function remove($id)
    {
        if (isset(self::$list[$id])) {
            self::$list[$id]->free();
        }
    }

Usage Example

示例#1
0
 /**
  * @TODO DESCR
  */
 public function onFinish()
 {
     if ($this->attachedServer) {
         $this->attachedServer->attachedClients->detach($this);
     }
     Timer::remove($this->keepaliveTimer);
     parent::onFinish();
 }
All Usage Examples Of PHPDaemon\Core\Timer::remove