APIs for getting the current time and waiting.
Gets time in milliseconds since RTOS start.
Since this is only 32 bits, it will roll over every 49 days, 17 hours, 2 mins, 47.296 seconds
Time in milliseconds since the RTOS started.
[out] tval: Pointer to the struct to populate with the RTOS time
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.