AC Solenoid Pump Control

Thank you! Yeah that makes much more sense to use millis. Hardware wise though, if I wanted to use 20vdc instead would it make sense to use a MOSFET driver with a flyback diode? It seems mechanical relays aren't designed for switching continuously and DC DC SSR relays are a bit pricey.