Skip to content

Commit 4b83c54

Browse files
committed
Adds API to get the currently seen count of 1s.
1 parent a28244e commit 4b83c54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/utils/Debouncer.hxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ public:
206206
return currentState_;
207207
}
208208

209+
/// @return the number of 1's in the past window.
210+
unsigned current_count()
211+
{
212+
return lastCount_;
213+
}
214+
209215
/// Callback from the polling loop checking the input state. @param state
210216
/// is the currently observed input state. @return true if the debounced
211217
/// state has just transitioned to matching the inbound parameter, false if

0 commit comments

Comments
 (0)