operator - method

Time operator -(
  1. Duration duration
)

Returns a Time that represents this Time with the given duration subtracted.

Implementation

Time operator - (Duration duration) {
  final other = duration.inMicroseconds;
  final microseconds = (inMicroseconds - other) % Day.microseconds;

  return Time.fromMicroseconds(microseconds.isNegative ? microseconds + Day.microseconds : microseconds);
}