30 m_time(
G::TimerTime::zero())
53 else if( immediate() )
65 return m_time <= now ;
72 m_immediate = time == 0U && time_us == 0U ;
92 G_ASSERT( m_active && m_immediate ) ;
107 G_ASSERT( m_active ) ;
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
void doTimeout()
Used by TimerList to execute the onTimeout() callback.
void adjust(unsigned long)
Used by TimerList to set the order of immedate() timer expiry.
bool immediate() const
Used by TimerList.
void cancelTimer()
Cancels the timer. Does nothing if not running.
void startTimer(unsigned int interval_s, unsigned int interval_us=0U)
Starts or restarts the timer so that it expires after the given interval.
bool expired(G::TimerTime &) const
Used by TimerList.
TimerBase(EventState es)
Constructor.
G::TimerTime t() const
Used by TimerList to get the expiry epoch time.
virtual ~TimerBase()
Destructor.
void remove(TimerBase &) noexcept
Removes a timer from the list.
void updateOnStart(TimerBase &)
Called by Timer when a timer is started.
void add(TimerBase &, EventState)
Adds a timer. Called from the Timer constructor.
static TimerList & instance()
Singleton access. Throws an exception if none.
static TimerList * ptr() noexcept
Singleton access. Returns nullptr if none.
void updateOnCancel(TimerBase &)
Called by Timer when a timer is cancelled.
An interval between two G::SystemTime values or two G::TimerTime values.
A monotonically increasing subsecond-resolution timestamp, notionally unrelated to time_t.
static TimerTime now()
Factory function for the current steady-clock time.
static TimerTime zero()
Factory function for the start of the epoch, guaranteed to be less than any now().