You ask for help but you do not say what you need help with. Does the code compile? Can you upload it? Does it run? What happens? What did you want to happen?
Also post a link to the flow sensor, the relay and tell us what type of Arduino you are using. Use the "link" icon so your links can be clicked.
They are enabled by default, so no need for this sei(); // Enable interrupts
If you want to avoid rollover issues in ~50 days, don't write your test against millis() this way if (currentTime >= (cloopTime + 1000)) as cloopTime + 1000 will overflow at some point. You should prefer the version with a subtractionif (currentTime - cloopTime >= 1000)
You might need to disable interruptions for a very short while, the time to copy flow_frequency into a local cached variable. If you don't do this, as interrupts keep running, you might end up with wrong calculation because the 2 bytes of your int will have changed whilst you do the math.
cli() if you want to match the sei() call you had… but those are AVR specific. if you want portability you should use noInterrupts() and interrupts() to activate them again
noInterrupts();
int flow_frequency_copy = flow_frequency ;
flow_frequency = 0;
interrupts();
// then do the math with the copy.
you could even record the time when you set flow_frequency to zero and not use a fixed frequency of 1000 to calculate exact duration, you maths would be more precise.