το καταλαβα το λαθος μου και το προσαρμοσα στον κωδικα και δουλευει τωρα
#include "DHT.h"


float therm;


float humid;


int hrs = 0;
int Min = 0;
int sec = 20;


#define DHTPIN 6 // what pin we're connected to


// Uncomment whatever type you're using!
#define DHTTYPE DHT11 // DHT 11


// Initialize DHT sensor for normal 16mhz Arduino
DHT dht(DHTPIN, DHTTYPE);


void setupdht11() {
dht.begin();
}


void readdht11() {
Serial.println("*********** DHT11 *********");
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
float h = dht.readHumidity();
float t = dht.readTemperature();

// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}


humid=h;
therm=t;


Serial.print("Humin void is ");
Serial.print(humid);
Serial.print(" %\t");


Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");

}

void set_time(){

sec = sec - 1;

if (sec == -1)
{
sec = 59;
Min = Min - 1;
}
if (Min == -1)
{
Min = 59;
hrs = hrs - 1;
}
if (hrs == -1) hrs = 0;
if (hrs <= 9)
{
Serial.print('0');
}
Serial.print(hrs);
Serial.print(':');
if (Min <= 9)
{
Serial.print('0');
}
Serial.print(Min);
Serial.print(':');
if (sec <= 9)
{
Serial.print('0');
}
Serial.println(sec);
}



void setup() {

Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino)
delay(500);
setupdht11();
delay(500);


}

void loop() {

set_time();

if (hrs == 0 && Min == 0 && sec == 0)
{

readdht11();

Serial.print("humid in main is ");
Serial.println(humid);

Serial.print("temp is ");
Serial.println(therm);
delay(500);
hrs =0;
Min =0;
sec = 20;
}
delay(1000);
}