Sure, if that is the only program, but it is not. This kind of thinking drains batteries faster than necessary, drains the cache, and reduces CPU efficiency.
sleep() is a wasteful system call, a kludge at best, and is never the correct solution to a synchronization problem.
No comments yet.