APIs for getting the current time and waiting.
◆ cy_rtos_get_time
Gets time in milliseconds since RTOS start.
- Note
- Since this is only 32 bits, it will roll over every 49 days, 17 hours, 2 mins, 47.296 seconds
- Parameters
-
[out] | tval | Pointer to the struct to populate with the RTOS time |
- Returns
- Time in milliseconds since the RTOS started.
◆ cy_rtos_time_get()
cy_rslt_t cy_rtos_time_get |
( |
cy_time_t * |
tval | ) |
|
Gets time in milliseconds since RTOS start.
- Note
- Since this is only 32 bits, it will roll over every 49 days, 17 hours, 2 mins, 47.296 seconds
- Parameters
-
[out] | tval | Pointer to the struct to populate with the RTOS time |
- Returns
- Time in milliseconds since the RTOS started.
◆ cy_rtos_delay_milliseconds()
cy_rslt_t cy_rtos_delay_milliseconds |
( |
cy_time_t |
num_ms | ) |
|
Delay for a number of milliseconds.
Processing of this function depends on the minimum sleep time resolution of the RTOS. The current thread should sleep for the longest period possible which is less than the delay required, then makes up the difference with a tight loop.
- Parameters
-
[in] | num_ms | The number of milliseconds to delay for |
- Returns
- The status of the delay request. [CY_RSLT_SUCCESS, CY_RTOS_GENERAL_ERROR]