10#ifndef SEMF_UTILS_SYSTEM_SOFTWARETIMER_H_
11#define SEMF_UTILS_SYSTEM_SOFTWARETIMER_H_
62 void reset()
override;
69 void start()
override;
81 uint32_t m_counter = 0;
Software SoftwareTimer which can be added to a TimeBase or used singular.
bool isRunning() const
Check if the timer is running.
virtual ~SoftwareTimer()=default
SoftwareTimer(uint32_t interval=0, bool start=false)
Constructor using no timebase.
uint32_t interval() const
Get the timer interval.
uint32_t counterValue() const
Get the current counter value.
void setInterval(uint32_t interval)
Set the timer interval.
void tick() override
Counting the time. Must be called cyclically by a timer interrupt or similar.
void start() override
Start time counting.
Interface for all classes receiving ticks like DigitalInPolling or SoftwareTimer.
A TimeBase is the bridge between e.g. a hardware timer (interrupt service routine) and TickReceiver o...
Class for using timer hardware.