On 25/02/18 08:39, Michael J. Mahon wrote:
> Andy Burns wrote:
>> ewholz@gmail.com wrote:
>>
>>> Do I save anything using interrupt vs. the while loop code?
>>
>> It depends if the code could do something else useful during the 99.99%
>> of the time it *isn't* noticing the door become open or closed ...
>>
>>
>
> ...and on how easy, or hard, it is to do that “something else” while
> maintaining a polling rate adequate to the application.
>
Well that is the point of interrupts.
Your foreground polling rate then represents how often you want to
*know* that it's happened, not how often it HAS happened, or for how long.
--
"In our post-modern world, climate science is not powerful because it is
true: it is true because it is powerful."
Lucas Bergkamp
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|