difference method

  1. @useResult
Duration difference(
  1. OffsetTime other
)

Returns the difference between this and other.

final foo = OffsetTime(Offset(-2), 22);
final bar = OffsetTime(Offset(2), 12);

foo.difference(bar); // 14 hours
bar.difference(foo); // -14 hours

Implementation

@useResult Duration difference(OffsetTime other) => Duration(microseconds: _instant - other._instant);