public function getDuration()
    {
        if ($this->getEndDate()) {
            return $this->getEndDate()->getTimestamp() - $this->getStartDate()->getTimestamp();
        }

        return null;
    }
public function getDuration()
    {
        if ($this->getEndDate()) {
            return $this->getEndDate()->getTimestamp() - $this->getStartDate()->getTimestamp();
        }

        return null;
    }
public function getDuration ( ) { if ( $ this -> getEndDate ( ) ) { return $ this -> getEndDate ( ) -> getTimestamp ( ) - $ this -> getStartDate ( ) -> getTimestamp ( ) ; } return null ; }
Get process duration in seconds

@return int|null
Get process duration in seconds