digital output (count down) while analog data is in acquisition

Hy everybody,
i kindly ask your help. I'm logging temperature and humidity and while the void loop is running i have to control some ditigal output with a timer sequence. Every 10 minuts i have to sswitch the relays. I tried to put a delay after the "digitalwrite" but logically the delay is associated at the entire loop (sorry but i'm an arduino newcomer!!!)
how can i do?
Thanks for your suggestions!!!
Andrea.

Have you looked a the the blink without delay example?

Hy awol,
it seems perfect for my application. I will try as soon as i return home.
many many thanks!!!
Andrea.

Hy AWOL,
I tried to use the example adding some codes to read a temp and humidity but no way!!! where am i wrong? thanks again for your precious help!
Andrea.
This is the code:
#include <SHT1x.h>
#define dataPin 22 // DATA
#define clockPin 24 // SCK
SHT1x sht1x(dataPin, clockPin); // temp and humidity sensor

// constants won't change. Used here to
// set pin numbers:
const int ledPin = 2; // the number of the LED pin

// Variables will change:
int ledState = LOW; // ledState used to set the LED
long previousMillis = 0; // will store last time LED was updated

// the follow variables is a long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long interval = 100; // interval at which to blink (milliseconds)

void setup() {
// set the digital pin as output:
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
Serial.println("Starting up");
Serial.print("Temperature: ");
Serial.println("F. Humidity: ");
}

void loop()
{
// here is where you'd put code that needs to be running all the time.

// check to see if it's time to blink the LED; that is, if the
// difference between the current time and last time you blinked
// the LED is bigger than the interval at which you want to
// blink the LED.
unsigned long currentMillis = millis();

if(currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;

// if the LED is off turn it on and vice-versa:
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;

// set the LED with the ledState of the variable:
digitalWrite(ledPin, ledState);
}
{
float temp_c;
float humidity;
temp_c = sht1x.readTemperatureC();
humidity = sht1x.readHumidity();
{

}
Serial.print(temp_c);
Serial.print(" ");
Serial.print(",");
Serial.print(humidity);
Serial.print(" ");
Serial.println(",");

delay(100);

}
}

sorry: interval and delay are the same but i also tried with different amount but result is the same: the digital out switch when i have a printout of temp and humidity data.
Thanks again. Andrea.

Can you expalin what you're trying to do?
It looks like you've just nailed together the blink without delay example and some of your code without modifying either.

Please use code tags when posting code.

Sorry, next time i'll post it correctly.
What i need to do is control some solenoid valves with the dig out (for example every 10 minuts i need to switch off and then after other 10 minuts switch back on and so on) and acquire temp and humidity data every 5 seconds. As i told you i'm not an expert so be patient.
thanks.
Andrea.