poll method
Polls a GPIO for the edge event configured with GPIO.setGPIOedge. For character device GPIOs, the edge event should be consumed with readEvent. For sysfs GPIOs, the edge event should be consumed with GPIO.read.
Implementation
GPIOpolling poll(int timeoutMillis) {
_checkStatus();
return _checkError(_nativeGPIOpoll(_gpioHandle, timeoutMillis)) == 1
? GPIOpolling.success
: GPIOpolling.timeout;
}