src/Carbon/Traits/Difference.php
public function diffInRealSeconds($date = null, $absolute = true)
    {
        /** @var CarbonInterface $date */
        $date = $this->resolveCarbon($date);
        $value = $date->getTimestamp() - $this->getTimestamp();

        return $absolute ? abs($value) : $value;
    }
public function diffInRealSeconds($date = null, $absolute = true)
    {
        /** @var CarbonInterface $date */
        $date = $this->resolveCarbon($date);
        $value = $date->getTimestamp() - $this->getTimestamp();

        return $absolute ? abs($value) : $value;
    }
public function diffInRealSeconds ( $ date = null , $ absolute = true ) { /** @var CarbonInterface $date */ $ date = $ this -> resolveCarbon ( $ date ) ; $ value = $ date -> getTimestamp ( ) - $ this -> getTimestamp ( ) ; return $ absolute ? abs ( $ value ) : $ value ; }
Get the difference in seconds using timestamps.

@param Carbon|\DateTimeInterface|string|null $date
@param bool                                  $absolute Get the absolute of the difference

@return int
Get the difference in seconds using timestamps .