Hi!
Friend, I have explained it for you
here.
Every 5 - 6 seconds Arduino is checking others functions.
Regarding dosage, the way to make it very accurated is using delay and during this time Arduino won't make anything else. You can try using
millis but the code can hang in some part and a big amount will be dosed in your tank.
Here you can try make something using
while replacing this delay to make something during dosage.
Example:
unsigned long millis_dosage = millis();
while((millis() - millis_dosage) < tempo_dosagem)
{
digitalWrite(dosadora[i], HIGH);
do_something_else();
}
Best regards.