septillion:
Agreed. Although I think doing all that multiplication to get a single variable to compare is just a it mehh.I would consider:
unsigned long relayTimeFootprint = (hours << 12) || (minutes << 6) || seconds;But I think I would just give in and use three comparisons... Just because it's so damn clear what's going on if you do.
I don't know which Arduino the OP is using, but from what I understand, the Arduino UNO, at least, is more comfortable with multiplication than with bit shifts.