| Oh dear, you sound quite confused. https://linux.die.net/man/3/usleep
https://pubs.opengroup.org/onlinepubs/9699919799/functions/n...
Which is POSIX, which is supported by a number of OSes, such as QNX, Linux, BSDs, and countless others. https://docs.microsoft.com/en-us/windows/desktop/api/synchap... http://www.ertl.jp/ITRON/SPEC/FILE/mitron-400e.pdf
See page 43 on "Standard Profile" https://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornad... MSP-430 is not an OS, it is a microcontroller, so your comment makes absolutely no sense. Ironically one of the most popular open source MSP-430 OSes is FreeRTOS.. which of course has vTaskDelay. Like name an OS (RTOS or otherwise) that does not have an API to sleep for millisecond periods? Not saying none exist, but, it's probably easier to name the exceptions. |
ooh! I worked on one.
Cooperative multithreading, you could schedule a task (callback function) to be called in 'n' hundreds of microseconds.
There was a scheduler that would drop the entire CPU to a super low power state if no tasks were scheduled to happen anytime soon (and set a HW timer to wake the CPU when more tasks were going to come due), but there was no "user land" API to sleep the entire system.
Sleeping the entire system when battery life is important (better to do as much work during each CPU wake cycle as possible, then drop back down to super low sleep for extended periods of time), and when other code needs to run, is rather rude, so we didn't allow it.