I am using the Arduino IDE.
In a time critical application I am using something like this:
void loop() {
if (WiFi.softAPgetStationNum() != 0) {
DoSomething();
}
DoCritical();
}
I wonder how much time takes the if test on WiFi.softAPgetStationNum(). I could, for example, use a timer, to test, say every 10 seconds, the state of WiFi.softAPgetStationNum() and set a global boolean variable accordingly. Then, inside the loop(), the test would be on that boolean variable.
In other words, I wonder if WiFi.softAPgetStationNum() is just a "property" of the WiFi object that we read or if it is a method that takes time to execute each time it is invoked!
Thanks for any feedback,
Vladis