sys_time.h 845 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef SYS_TIME_H
  2. #define SYS_TIME_H
  3. #include "typedef.h"
  4. struct sys_time {
  5. u16 year;
  6. u8 month;
  7. u8 day;
  8. u8 hour;
  9. u8 min;
  10. u8 sec;
  11. };
  12. #if 0
  13. struct tm {
  14. int tm_sec; /* Seconds. [0-60] (1 leap second) */
  15. int tm_min; /* Minutes. [0-59] */
  16. int tm_hour; /* Hours. [0-23] */
  17. int tm_mday; /* Day. [1-31] */
  18. int tm_mon; /* Month. [0-11] */
  19. int tm_year; /* Year - 1900. */
  20. int tm_wday; /* Day of week. [0-6] */
  21. int tm_yday; /* Days in year.[0-365] */
  22. int tm_isdst; /* DST. [-1/0/1]*/
  23. # ifdef __USE_MISC
  24. long int tm_gmtoff; /* Seconds east of UTC. */
  25. const char *tm_zone; /* Timezone abbreviation. */
  26. # else
  27. long int __tm_gmtoff; /* Seconds east of UTC. */
  28. const char *__tm_zone; /* Timezone abbreviation. */
  29. # endif
  30. };
  31. #endif
  32. #endif