22 #include <ITimerEventReceiver.h> 40 _timerEventReceiver = NULL;
45 _timerEventReceiver = timerEventReceiver;
50 _isAutoreset = isAutoreset;
55 _msInterval = milliseconds;
76 return millis() - _msStart;
81 if (_isEnabled &&
Elapsed() >= _msInterval && _timerEventReceiver != NULL)
Interface that provides screen touch notifications. If you want receive this notification in the targ...
Definition: ITimerEventReceiver.h:24
bool IsEnabled()
Returns true if timer is active.
Definition: ATimer.h:58
void SetInterval(uint32_t milliseconds)
Set timer interval in milliseconds.
Definition: ATimer.h:53
void Enable()
Starts timer.
Definition: ATimer.h:63
void Reset()
Disabels timer.
Definition: ATimer.h:69
virtual void NotifyTimer(ATimer *timer)=0
Has to be implemented in target class.
uint32_t Elapsed()
Returns actual elapsed time.
Definition: ATimer.h:74
void RegisterTimerEventReceiver(ITimerEventReceiver *timerEventReceiver)
Registers event receiver.
Definition: ATimer.h:43
void SetAutoReset(bool isAutoreset)
Set whether timer is in autoreset modus.
Definition: ATimer.h:48