Fork of the espurna firmware for `mhsw` switches
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.

41 lines
756 B

  1. /*
  2. Part of NTP MODULE
  3. */
  4. // Based on https://github.com/PaulStoffregen/time
  5. // Avoid doing any math (elapsed..., numberOf... functions and etc.),
  6. // simply expect POSIX time API usage, and provide bare minimum to simplify `tm` access
  7. #pragma once
  8. #include <cstdint>
  9. #include <time.h>
  10. #include <sys/time.h>
  11. int utc_hour(time_t ts);
  12. int utc_minute(time_t ts);
  13. int utc_second(time_t ts);
  14. int utc_day(time_t ts);
  15. int utc_weekday(time_t ts);
  16. int utc_month(time_t ts);
  17. int utc_year(time_t ts);
  18. int hour(time_t ts);
  19. int minute(time_t ts);
  20. int second(time_t ts);
  21. int day(time_t ts);
  22. int weekday(time_t ts);
  23. int month(time_t ts);
  24. int year(time_t ts);
  25. int hour();
  26. int minute();
  27. int second();
  28. int day();
  29. int weekday();
  30. int month();
  31. int year();
  32. time_t now();