💾File: sys_time.h
📦Library: lib2_sys
bool sys_timeout_ms(uint64_t* tm, uint32_t timeout_ms)
▶️ Param: tm timer variable, must init with 0 on start▶️ Param: timeout_ms timeout in ms- ✅Return: true if timeout
void sys_delay_us(uint32_t delay_us)
▶️ Param: delay_us Delay in us
static inline void sys_delay_ms(uint32_t delay_ms)
▶️ Param: delay_ms Delay in ms
static inline void sys_delay_s(uint32_t delay_s)
▶️ Param: delay_us Delay in s
bool sys_check_datetime(datetime_t *dt)
▶️ Param: dt datetime_t to check- ✅Return: true if datetime_t valid
bool sys_setrtc(datetime_t *dt)
▶️ Param: dt Datetime_t to set- ✅Return: true if rtc set
bool sys_getrtc(datetime_t *dt)
▶️ Param: dt Datetime_t to get- ✅Return: true if rtc get
void sys_getrtc_str(int8_t* buf, size_t buflen)
▶️ Param: buf String buffer▶️ Param: buflen String buffer length
void sys_getrtc_format(int8_t* format, int8_t* buf, size_t buflen)
▶️ Param: format Date time format▶️ Param: buf String buffer▶️ Param: buflen String buffer length
uint8_t sys_dayOfWeek(datetime_t *dt)
▶️ Param: dt Datetime_t to calculate- ✅Return: Day of week (0=Sunday)
void sys_secondsToDate(int64_t ts, datetime_t *dt)
▶️ Param: ts Seconds since unix epoch▶️ Param: dt Datetime_t to get