Convert TimeOfDay to double for comparison
double timeOfDayToDouble(TimeOfDay myTime) => myTime.hour + myTime.minute / 60.0;