|
|
|
|
|
by com2kid
2689 days ago
|
|
> Like name an OS (RTOS or otherwise) that does not have an API to sleep for millisecond periods? 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. |
|