Changed duration() to currentDuration() and added examples
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ unsigned long Debouncer::previousDuration() const {
|
||||
return durationOfPreviousState;
|
||||
}
|
||||
|
||||
unsigned long Debouncer::duration() const {
|
||||
unsigned long Debouncer::currentDuration() const {
|
||||
return (millis() - stateChangeLastTime);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -137,7 +137,8 @@ public:
|
||||
@return The duration in milliseconds (unsigned long) of the current state.
|
||||
*/
|
||||
|
||||
unsigned long duration() const;
|
||||
unsigned long currentDuration() const;
|
||||
|
||||
|
||||
/**
|
||||
@brief Returns the duration in milliseconds of the previous state.
|
||||
|
||||
Reference in New Issue
Block a user