src/Duration.php
public static function between(Instant $startInclusive, Instant $endExclusive) : Duration
    {
        $seconds = $endExclusive->getEpochSecond() - $startInclusive->getEpochSecond();
        $nanos = $endExclusive->getNano() - $startInclusive->getNano();

        return Duration::ofSeconds($seconds, $nanos);
    }
public static function between(Instant $startInclusive, Instant $endExclusive) : Duration
    {
        $seconds = $endExclusive->getEpochSecond() - $startInclusive->getEpochSecond();
        $nanos = $endExclusive->getNano() - $startInclusive->getNano();

        return Duration::ofSeconds($seconds, $nanos);
    }
public static function between ( Instant $ startInclusive , Instant $ endExclusive ) : Duration { $ seconds = $ endExclusive -> getEpochSecond ( ) - $ startInclusive -> getEpochSecond ( ) ; $ nanos = $ endExclusive -> getNano ( ) - $ startInclusive -> getNano ( ) ; return Duration :: ofSeconds ( $ seconds , $ nanos ) ; }
Returns a Duration representing the time elapsed between two instants.

A Duration represents a directed distance between two points on the time-line.
As such, this method will return a negative duration if the end is before the start.

@param \Brick\DateTime\Instant $startInclusive The start instant, inclusive.
@param \Brick\DateTime\Instant $endExclusive   The end instant, exclusive.

@return \Brick\DateTime\Duration
Returns a Duration representing the time elapsed between two instants .