difference method

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

Returns the difference between this and other.

LocalTime(22).difference(LocalTime(12)); // 10 hours

LocalTime(13).difference(LocalTime(23)); // -10 hours

Implementation

@useResult Duration difference(LocalTime other) => Duration(microseconds: dayMicroseconds - other.dayMicroseconds);