abs method

Duration abs()

A positive Duration with the same absolute length as this Duration.

The returned Duration has the same length as this one, but is always positive where possible.

Implementation

Duration abs() =>
    inMicroseconds >= 0 ? this : Duration._microseconds(0 - inMicroseconds);