Using ESP_NOW with loop and delays

  arduino-ide, c++, delay, esp32, loops

I’m trying to receive a data from one esp32 to another.
I’m also doing some looping with delays for reading a sensor data and switch on/off relay cooling.
This device also use ESPAsyncWebServer as API server (not included in code for the size).
I’m receiving the data from one eps32 in POST request to API right now. I would like to change this as to be able to recieve with esp_now. I was doing some experiments, but the data receving is delayed because of delay method in loop.
Is there a way to make this asynchronized as for example the ESPA above?

I also tried a way with comparing a milis() (time) to wait for a loop, but I thing that is too "resource consuming" task, to let it compare in full speed in loop like a vortex forever.

here is my loop

void loop() {
    if (WiFi.status() == WL_CONNECTED) {
        float temp_check = dht.readTemperature();

        if (temp_check == 0) {
            temp_check = dht.readTemperature();

        if (temp_check > 32.0 && *cooling_switch_p == false) {
            Serial.println("[ INF ] Too high temperature, switch on a cooling system");
            digitalWrite(COOLING_RELAY, LOW);
            *cooling_switch_p = true;
        else if (temp_check < 30.0  && *cooling_switch_p == true) {
            Serial.println("[ INF ] Normal temperature, switch off a cooling system");
            digitalWrite(COOLING_RELAY, HIGH);
            *cooling_switch_p = false;

        Serial.print("[ DBG ] Light Switch: ");

        Serial.print("[ DBG ] Pump Switch: ");

    else {
        Serial.println("[ ERR ] Wifi not connected. Exiting program");

Source: Windows Questions C++