Re: help



Keith Thompson wrote:

Other than in some embedded systems where the CPU is running one and
only one program, using a busy loop to wait for a specified period of
time is, as far as I can tell, *never* a good idea.

The only system where a busy loop can be acceptable would be a
mains-powered embedded device running a single-threaded program.
I think those devices are becoming vanishingly rare.

For battery-powered embedded devices, a busy loop is an extremely bad
idea, because it will significantly reduce the time before the
batteries have to be replaced/recharged.

Bart v Ingen Schenau
--
a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq
c.l.c FAQ: http://www.eskimo.com/~scs/C-faq/top.html
c.l.c++ FAQ: http://www.parashift.com/c++-faq-lite/
.



Relevant Pages