- I (10623) MQTT_DAQ: today 2022-04-30 23:59:13
- I (10623) MQTT_DAQ: Alarm time 2022-05-01 07:00:00
- I (10633) Remain time: time 111647.000000
- I (10643) MQTT_DAQ: File written
- I (150633) MQTT_DAQ: File written
Please help me solve this problem.
Sorry for my English
- time_t i2clocaltime = mktime(&local_time);
- time_t alrmtime = mktime(&alarm_time);
- double remain_time = difftime(alrmtime,i2clocaltime);
- ESP_LOGI(TAG,"Alarm time %04d-%02d-%02d %02d:%02d:%02d",alarm_time.tm_year,alarm_time.tm_mon,alarm_time.tm_mday,alarm_time.tm_hour,alarm_time.tm_min,alarm_time.tm_sec);
- ESP_LOGI("Remain time","time %f",remain_time);