We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e34ce commit da95451Copy full SHA for da95451
cores/esp8266/PolledTimeout.h
@@ -158,10 +158,9 @@ class timeoutTemplate
158
IRAM_ATTR // fast
159
bool expired()
160
{
161
- YieldPolicyT::execute(); //in case of DoNothing: gets optimized away
162
- if(PeriodicT) //in case of false: gets optimized away
163
- return expiredRetrigger();
164
- return expiredOneShot();
+ bool hasExpired = PeriodicT ? expiredRetrigger() : expiredOneShot();
+ if (!hasExpired) YieldPolicyT::execute(); //in case of DoNothing: gets optimized away
+ return hasExpired;
165
}
166
167
0 commit comments