time_sntp.h 636 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #ifndef TIMESNTP_H
  3. #define TIMESNTP_H
  4. #include <string>
  5. #include <time.h>
  6. #include <sys/time.h>
  7. #include "freertos/FreeRTOS.h"
  8. #include "freertos/task.h"
  9. #include "freertos/event_groups.h"
  10. #include "esp_system.h"
  11. #include "esp_log.h"
  12. #include "esp_attr.h"
  13. #include "esp_sleep.h"
  14. #include "esp_sntp.h"
  15. std::string getCurrentTimeString(const char * frm);
  16. std::string ConvertTimeToString(time_t _time, const char * frm);
  17. bool getTimeIsSet(void);
  18. bool getTimeWasNotSetAtBoot(void);
  19. bool getUseNtp(void);
  20. bool setupTime();
  21. bool time_manual_reset_sync(void);
  22. extern int LocalTimeToUTCOffsetSeconds;
  23. #endif //TIMESNTP_H