public function registerTimeHandler($interval, $object, $methodname = '')
    {
        $id = $this->_timehandlerid++;

        if (!empty($methodname)) {
            $object = array($object, $methodname);
        }

        $this->_timehandler[] = array(
            'id' => $id,
            'interval' => $interval,
            'callback' => $object,
            'lastmicrotimestamp' => microtime(true),
        );
        $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: timehandler('
            .$id.') registered', __FILE__, __LINE__
        );

        if (($this->_mintimer == false) || ($interval < $this->_mintimer)) {
            $this->_mintimer = $interval;
        }

        return $id;
    }
public function registerTimeHandler($interval, $object, $methodname = '')
    {
        $id = $this->_timehandlerid++;

        if (!empty($methodname)) {
            $object = array($object, $methodname);
        }

        $this->_timehandler[] = array(
            'id' => $id,
            'interval' => $interval,
            'callback' => $object,
            'lastmicrotimestamp' => microtime(true),
        );
        $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: timehandler('
            .$id.') registered', __FILE__, __LINE__
        );

        if (($this->_mintimer == false) || ($interval < $this->_mintimer)) {
            $this->_mintimer = $interval;
        }

        return $id;
    }
public function registerTimeHandler ( $ interval , $ object , $ methodname = '' ) { $ id = $ this -> _timehandlerid ++ ; if ( ! empty ( $ methodname ) ) { $ object = array ( $ object , $ methodname ) ; } $ this -> _timehandler [ ] = array ( 'id' => $ id , 'interval' => $ interval , 'callback' => $ object , 'lastmicrotimestamp' => microtime ( true ) , ) ; $ this -> log ( SMARTIRC_DEBUG_TIMEHANDLER , 'DEBUG_TIMEHANDLER: timehandler(' . $ id . ') registered' , __FILE__ , __LINE__ ) ; if ( ( $ this -> _mintimer == false ) || ( $ interval < $ this -> _mintimer ) ) { $ this -> _mintimer = $ interval ; } return $ id ; }
registers a timehandler and returns the assigned id

Registers a timehandler in Net_SmartIRC, which will be called in the specified interval.
The timehandler id is needed for unregistering the timehandler.

@api
@see example7.php
@param integer $interval interval time in milliseconds
@param object|callable $object either an object with the method, or a callable
@param string $methodname the methodname that will be called when the handler happens
@return integer assigned timehandler id
registers a timehandler and returns the assigned id