public function scheduleTimeout(TimerInterface $timer, $newTimer)
    {

        // check if this timer has been cancelled by another thread
        if ($newTimer === false && $this->getTimers()->has($timer->getId()) === false) {
            return; // if yes, we just return
        }

        // if next expiration is NULL, no more tasks will be scheduled for this timer
        if ($timer->getNextExpiration() == null) {
            return; // we just return
        }

        // create the timer task and schedule it
        $this->getTimerServiceExecutor()->schedule($timer);
    }
public function scheduleTimeout(TimerInterface $timer, $newTimer)
    {

        // check if this timer has been cancelled by another thread
        if ($newTimer === false && $this->getTimers()->has($timer->getId()) === false) {
            return; // if yes, we just return
        }

        // if next expiration is NULL, no more tasks will be scheduled for this timer
        if ($timer->getNextExpiration() == null) {
            return; // we just return
        }

        // create the timer task and schedule it
        $this->getTimerServiceExecutor()->schedule($timer);
    }
public function scheduleTimeout ( TimerInterface $ timer , $ newTimer ) { // check if this timer has been cancelled by another thread if ( $ newTimer === false && $ this -> getTimers ( ) -> has ( $ timer -> getId ( ) ) === false ) { return ; // if yes, we just return } // if next expiration is NULL, no more tasks will be scheduled for this timer if ( $ timer -> getNextExpiration ( ) == null ) { return ; // we just return } // create the timer task and schedule it $ this -> getTimerServiceExecutor ( ) -> schedule ( $ timer ) ; }
Creates and schedules a timer task for the next timeout of the passed timer.

@param \AppserverIo\Psr\EnterpriseBeans\TimerInterface $timer    The timer we want to schedule a task for
@param boolean                                         $newTimer TRUE if this is a new timer being scheduled, and not a re-schedule due to a timeout

@return void
Creates and schedules a timer task for the next timeout of the passed timer .