Retorna o tempo de espera do cliente até ser atendido.
A diferença entre a data de chegada até a data de chamada (ou atual).

@return DateInterval
502341
public function getTempoEspera()
    {
        if ($this->tempoEspera) {
            return $this->secondsToDateInterval($this->tempoEspera);
        }
        
        $now = new DateTime();
        $interval = $now->diff($this->getDataChegada());

        return $interval;
    }
409762
private function fullDiff() : DateInterval
    {
        if (null === $this->fullDiff) {
            $this->fullDiff = $this->from->diff($this->until);
        }
        
        return $this->fullDiff;
    }
1152186
public function getOnline()
    {
        if (!$this->getLastActivity()) return 9999;
        $now = new \DateTime();
        $interval = $now->diff($this->getLastActivity());
        return $interval->i;
    }
381867
public function getTotalDays()
	{
		// Get a count of days.  The 'diff' function generates an interval with a count of days in ->days
		$dt = new \DateTimeImmutable();
		return $dt->add( $this->Value )->diff( $dt )->days;
	}
585890
public function getChangelogMinDate()
    {
        $result = null;
        $asChange = 'c';
        $tblChange = $this->resource->getTableName(EChange::ENTITY_NAME);
        /* select from account */
        $query = $this->conn->select();
        $query->from([$asChange => $tblChange], [EChange::A_DATE_CHANGED]);
        /* order by */
        $query->order([$asChange . '.' . EChange::A_DATE_CHANGED . ' ASC']);
        /* perform query */
        $result = $this->conn->fetchOne($query);
        if ($result < self::DATE_MIN) {
            $result = self::DATE_MIN;
        }
        return $result;
    }
280559
public function getBadPasswordDate()
    {
        if ($timestamp = $this->getBadPasswordTimestamp()) {
            return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
        }
    }
178757
public function getTimeLeft()
    {
        $iTimeout = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iPsBasketReservationTimeout');
        if ($iTimeout > 0) {
            $oRev = $this->getReservations();
            if ($oRev && $oRev->getId()) {
                $iTimeout -= (\OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() - (int) $oRev->oxuserbaskets__oxupdate->value);
                \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("iBasketReservationTimeout", $oRev->oxuserbaskets__oxupdate->value);
            } elseif (($iSessionTimeout = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("iBasketReservationTimeout"))) {
                $iTimeout -= (\OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() - (int) $iSessionTimeout);
            }

            return $iTimeout < 0 ? 0 : $iTimeout;
        }

        return 0;
    }
961264
public function date(): Date
    {
        if ($this->date === null) {
            $this->date = new Date($this->attribute('DATE'));
        }

        return $this->date;
    }
861758
public function getTimestamp()
    {
        $name = $this->name;
        $this->timestamp = $this->resource->getTimestamp($name, $this->sdopx);
        return $this->timestamp;
    }
77332
public function getDateAdded() : ?DateTime
     {
        $rtn = $this->data['date_added'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
805750
public function Date()
    {
        $formatter = $this->getFormatter(IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE);
        return $formatter->format($this->getTimestamp());
    }
209099
public function getPeriodLabel()
	{
		$contexts = $this->contexts; // Protect the contexts
		try
		{
			// If there are only instant context and all the contexts have the same date...
			if ( ! $this->DurationContexts()->count() && count( $this->AllYears() ) == 1 )
			{
				$context = reset( $this->contexts );
				return $context['period']['endDate'];
			}
			else
			{
				$this->sortByStartDate();
				$startContext = reset( $this->contexts );
				$this->sortByEndDate();
				$endContext = end( $this->contexts );
				return "{$startContext['period']['startDate']} - {$endContext['period']['endDate']}";
			}
		}
		finally
		{
			$this->contexts = $contexts; // Restore
		}
	}
391945
private function newTime()
    {
        $currentHour = date('H');
        $currentMin = date('i');
        $currentSec = date('s');
        $currentMon = date('m');
        $currentDay = date('d');
        $currentYear = date('y');
        return mktime($currentHour, ($currentMin + $_SESSION['session_time']), $currentSec, $currentMon, $currentDay, $currentYear);
    }
739476
public function getRemainingSuspensionTime()
	{
		if(!$this->isSuspended())
			return 0;

		$lastAttempt = clone $this->last_attempt_at;

		$suspensionTime  = static::$suspensionTime;
		$clearAttemptsAt = $lastAttempt->modify("+{$suspensionTime} minutes");
		$now             = new Datetime;

		$timeLeft = $clearAttemptsAt->diff($now);

		$minutesLeft = ($timeLeft->s != 0 ?
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i) + 1 :
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i));

		return $minutesLeft;
	}
851601
public function getCleanInterval()
    {
        if (!$this->cleanInterval instanceof DateInterval) {
            $this->cleanInterval = new DateInterval($this->cleanInterval);
        }
        return $this->cleanInterval;
    }
590250
public function getDataGeracao()
    {
        $data = $this->header->data_de_geracao ? \DateTime::createFromFormat('dmy', sprintf('%06d', $this->header->data_de_geracao)) : false;
        if ($data) {
            $data->setTime(0, 0, 0);
        }

        return $data;
    }
1154720
public function isLeo()
    {
        return ($this->month === self::MONTH_JULY) && ($this->day >= 23) && ($this->day <= 30) || ($this->month === self::MONTH_MAY) && ($this->day <= 22);
    }