Skip to content

Commit 79f44a3

Browse files
Fixed this->_delay typo
1 parent 68b6076 commit 79f44a3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Observables/ObservableTimerMillis.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ void ObservableTimerMillis<T>::Suscribe(IObserver<T> &observer)
6060
template <typename T>
6161
void ObservableTimerMillis<T>::Update()
6262
{
63-
if (_isActive == false) return;
64-
65-
auto elapsed = static_cast<unsigned long>(millis() - _startTime);
63+
if (_isActive == false) return;
64+
65+
auto elapsed = static_cast<unsigned long>(millis() - _startTime);
6666
if (elapsed >= _interval + _offset)
6767
{
6868
if (_childObserver != nullptr) _childObserver->OnNext(elapsed);
@@ -74,7 +74,7 @@ template <typename T>
7474
void ObservableTimerMillis<T>::Reset()
7575
{
7676
this->_isActive = true;
77-
this->_offset = delay;
77+
this->_offset = this->_delay;
7878
this->_startTime = millis();
7979
}
8080

@@ -122,4 +122,4 @@ bool ObservableTimerMillis<T>::IsActive() const
122122
return _isActive;
123123
}
124124

125-
#endif
125+
#endif

0 commit comments

Comments
 (0)