src/Carbon/Traits/Difference.php
public function diffInMicroseconds($date = null, $absolute = true)
    {
        $diff = $this->diff($this->resolveCarbon($date));
        $value = (int) round((((($diff->days * static::HOURS_PER_DAY) +
            $diff->h) * static::MINUTES_PER_HOUR +
            $diff->i) * static::SECONDS_PER_MINUTE +
            ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND);

        return $absolute || !$diff->invert ? $value : -$value;
    }
public function diffInMicroseconds($date = null, $absolute = true)
    {
        $diff = $this->diff($this->resolveCarbon($date));
        $value = (int) round((((($diff->days * static::HOURS_PER_DAY) +
            $diff->h) * static::MINUTES_PER_HOUR +
            $diff->i) * static::SECONDS_PER_MINUTE +
            ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND);

        return $absolute || !$diff->invert ? $value : -$value;
    }
public function diffInMicroseconds ( $ date = null , $ absolute = true ) { $ diff = $ this -> diff ( $ this -> resolveCarbon ( $ date ) ) ; $ value = ( int ) round ( ( ( ( ( $ diff -> days * static :: HOURS_PER_DAY ) + $ diff -> h ) * static :: MINUTES_PER_HOUR + $ diff -> i ) * static :: SECONDS_PER_MINUTE + ( $ diff -> f + $ diff -> s ) ) * static :: MICROSECONDS_PER_SECOND ) ; return $ absolute || ! $ diff -> invert ? $ value : - $ value ; }
Get the difference in microseconds.

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

@return int
Get the difference in microseconds .