Skip to content

Commit e699b1a

Browse files
SuGliderCopilot
andauthored
feat(example): improves ISR execution time
Co-authored-by: Copilot <[email protected]>
1 parent c486b4d commit e699b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP32/examples/GPIO/FunctionalInterruptLambda/FunctionalInterruptLambda.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void setup() {
219219

220220
// Update captured variables via pointers
221221
(*totalInterruptsPtr)++;
222-
(*lastInterruptTimePtr) = millis();
222+
(*lastInterruptTimePtr) = currentTime;
223223

224224
// Toggle LED state and set flag for main loop to handle
225225
(*ledStatePtr) = !(*ledStatePtr);

0 commit comments

Comments
 (0)