You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 regels
667 B

  1. #pragma once
  2. #include <Arduino.h>
  3. #include <Time3.h>
  4. /*============================================================================*/
  5. //typedef unsigned long timestamp_t;
  6. //typedef struct {
  7. // uint8_t Second;
  8. // uint8_t Minute;
  9. // uint8_t Hour;
  10. // //uint8_t Wday; // day of week, sunday is day 1
  11. // uint8_t Day;
  12. // uint8_t Month;
  13. // uint8_t Year; // offset from 1970;
  14. //} tmElements_t;
  15. /* low level functions to convert to and from system time */
  16. void breakTime(const timestamp_t time, tmElements_t &tm); // break timestamp_t into elements
  17. timestamp_t makeTimestamp(const tmElements_t &tm); // convert time elements into timestamp_t