durationDiff method
Implementation
int durationDiff(TimeOfDay other, int duration) {
if (this.hour < other.hour &&
(other.minute - this.minute).abs() == duration) return -1;
if (this.hour > other.hour &&
(this.minute - other.minute).abs() == duration) return 1;
return 0;
}