time_sync.h 436 B

123456789101112131415161718192021222324252627
  1. /*
  2. * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /**
  11. * @brief Update the system time from time stored in NVS.
  12. *
  13. */
  14. esp_err_t update_time_from_nvs(void);
  15. /**
  16. * @brief Fetch the current time from SNTP and stores it in NVS.
  17. *
  18. */
  19. esp_err_t fetch_and_store_time_in_nvs(void*);
  20. #ifdef __cplusplus
  21. }
  22. #endif