Closing a solenoid after a set time interval ends

The code had too many characters to post, but I attached it.

What happens before:
else if (L2_run) { // Solenoid 2 is supposed to be open

Before this, the volume that is dispensed by the first solenoid is set.

RunWateringSequence(); //checks if the solenoid has been selected in the Blynk app and if so, grabs the start time and independent volume or time variable that is user defined.

AllVaulvesOff(); //sets the three pins to the three solenoids to "low" / closed

WateringSystemMay2posted.ino (14.9 KB)