Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c83f9a

Browse files
committed
Expired check ALWAYS executes yield policy BEFORE checking expiration - that's wasted time.
Expired keeps executing yield policy on already expired oneShot - that's counter intuitive and wasted time.
1 parent9863f71 commit9c83f9a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎cores/esp8266/PolledTimeout.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,9 @@ class timeoutTemplate
158158
IRAM_ATTR// fast
159159
boolexpired()
160160
{
161-
YieldPolicyT::execute();//in case of DoNothing: gets optimized away
162-
if(PeriodicT)//in case of false: gets optimized away
163-
returnexpiredRetrigger();
164-
returnexpiredOneShot();
161+
bool hasExpired = PeriodicT ?expiredRetrigger() :expiredOneShot();
162+
if (!hasExpired)YieldPolicyT::execute();//in case of DoNothing: gets optimized away
163+
return hasExpired;
165164
}
166165

167166
IRAM_ATTR// fast

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp