| 1234567891011121314151617181920212223 |
- #ifndef _G_Time_H__
- #define _G_Time_H__
- #include "os/os_type.h"
- typedef struct{
- uint16_t year; /*YYYY*/
- uint8_t month;
- uint8_t day;
- uint8_t hour;
- uint8_t minute;
- uint8_t second;
- }time_val;
- uint32_t calendar_to_utc(time_val *time);
- void set_utc_time(time_val *time);
- void get_local_time(time_val *out, int8_t tz);
- uint32_t get_timestamp(void);
- uint32_t get_timestamp_with_time_zone(int8_t tz);
- #endif /* _G_Time_H__ */
|