public function createSingleActionTimer($duration, \Serializable $info = null, $persistent = true)
    {

        // create the actual date and add the initial expiration
        $now = new \DateTime();
        $now->add(new \DateInterval(sprintf('PT%dS', $duration / 1000000)));

        // we don't have an interval
        $intervalDuration = 0;

        // create and return the timer instance
        return $this->createTimer($now, $intervalDuration, $info, $persistent);
    }
public function createSingleActionTimer($duration, \Serializable $info = null, $persistent = true)
    {

        // create the actual date and add the initial expiration
        $now = new \DateTime();
        $now->add(new \DateInterval(sprintf('PT%dS', $duration / 1000000)));

        // we don't have an interval
        $intervalDuration = 0;

        // create and return the timer instance
        return $this->createTimer($now, $intervalDuration, $info, $persistent);
    }
public function createSingleActionTimer ( $ duration , \ Serializable $ info = null , $ persistent = true ) { // create the actual date and add the initial expiration $ now = new \ DateTime ( ) ; $ now -> add ( new \ DateInterval ( sprintf ( 'PT%dS' , $ duration / 1000000 ) ) ) ; // we don't have an interval $ intervalDuration = 0 ; // create and return the timer instance return $ this -> createTimer ( $ now , $ intervalDuration , $ info , $ persistent ) ; }
Create a single-action timer that expires after a specified duration.

@param integer       $duration   The number of microseconds that must elapse before the timer expires
@param \Serializable $info       Serializable info that will be made available through the newly created timers Timer::getInfo() method
@param boolean       $persistent TRUE if the newly created timer has to be persistent

@return \AppserverIo\Psr\EnterpriseBeans\TimerInterface The newly created Timer.
@throws \AppserverIo\Psr\EnterpriseBeans\EnterpriseBeansException If this method could not complete due to a system-level failure.
Create a single - action timer that expires after a specified duration .