public function getDuration()
    {
        $duration = false;
        if ($this->getExecutedAt() && ($this->getExecutedAt() != '0000-00-00 00:00:00')) {
            if ($this->getFinishedAt() && ($this->getFinishedAt() != '0000-00-00 00:00:00')) {
                $time = strtotime($this->getFinishedAt());
            } elseif ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
                $time = time();
            } else {
                // Mage::throwException('No finish time found, but the job is not running');
                return false;
            }
            $duration = $time - strtotime($this->getExecutedAt());
        }
        return $duration;
    }
public function getDuration()
    {
        $duration = false;
        if ($this->getExecutedAt() && ($this->getExecutedAt() != '0000-00-00 00:00:00')) {
            if ($this->getFinishedAt() && ($this->getFinishedAt() != '0000-00-00 00:00:00')) {
                $time = strtotime($this->getFinishedAt());
            } elseif ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
                $time = time();
            } else {
                // Mage::throwException('No finish time found, but the job is not running');
                return false;
            }
            $duration = $time - strtotime($this->getExecutedAt());
        }
        return $duration;
    }
public function getDuration ( ) { $ duration = false ; if ( $ this -> getExecutedAt ( ) && ( $ this -> getExecutedAt ( ) != '0000-00-00 00:00:00' ) ) { if ( $ this -> getFinishedAt ( ) && ( $ this -> getFinishedAt ( ) != '0000-00-00 00:00:00' ) ) { $ time = strtotime ( $ this -> getFinishedAt ( ) ) ; } elseif ( $ this -> getStatus ( ) == Aoe_Scheduler_Model_Schedule :: STATUS_RUNNING ) { $ time = time ( ) ; } else { // Mage::throwException('No finish time found, but the job is not running'); return false ; } $ duration = $ time - strtotime ( $ this -> getExecutedAt ( ) ) ; } return $ duration ; }
Get job duration.

@return bool|int time in seconds, or false
Get job duration .