News for hackers. Stuff that matters.
Re:Nubsio GPIO API – A Windows USB interface for controlling... by jjcc on Monday April 03, 2017 @12:52AM (#14020659)
Polling usually is not considered to be a real time method. To reduce latency it will consume unnecessary CPU cycle, I think
Re:Nubsio GPIO API – A Windows USB interface for controlling... by Matthias247 on Monday April 03, 2017 @02:27AM (#14020958)
it actually is, as long as your polling interval is deterministic and meets the requirements of your target application (polling interval < state change interval).

If you look at real hardware (or FPGAs) they will basically do polling: The input gets sampled at each clock cycle and will then get processed. And hardware is definitely realtime :)

The downside of polling is that you burn CPU resources when actually nothing happens. Interrupt driven designs help there.

Re:Nubsio GPIO API – A Windows USB interface for controlling... by sokoloff on Monday April 03, 2017 @09:31AM (#14022584)
> If you look at real hardware (or FPGAs) they will basically do polling: The input gets sampled at each clock cycle and will then get processed. And hardware is definitely realtime :)

Smiley noted; I think we can agree that "polling at 10s of MHz on an input pin" becomes something quite different than "polling at 10s of kHz on the other side of a USB link".

Re:Nubsio GPIO API – A Windows USB interface for controlling... by jononor on Monday April 03, 2017 @10:48AM (#14023113)
USB link to a PC with a general-purpose OS likely kills the determinism requirement.
Re:Nubsio GPIO API – A Windows USB interface for controlling... by 8note on Monday April 03, 2017 @01:57AM (#14020866)
for the operating systems version of real time, i'd consider it polling to be real time. you ensure that part of your code will always take the same amount of time.