30 m_time(
G::TimerTime::zero())
53 else if( immediate() )
60 return m_time <= now ;
85 return m_time.sameSecond( history() ) ;
91 G_ASSERT( immediate() ) ;
101 G_ASSERT( !active() ) ;
106 G_ASSERT( active() ) ;
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
void doTimeout()
Used by TimerList to execute the onTimeout() callback.
bool immediate() const
Used by TimerList.
void cancelTimer()
Cancels the timer. Does nothing if not running.
TimerBase(ExceptionSink es)
Constructor.
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.
G::TimerTime t() const
Used by TimerList to get the expiry epoch time.
virtual ~TimerBase()
Destructor.
void adjust(unsigned int us)
Used by TimerList to set the fractional part of the expiry time of immediate() timers so that t() is ...
void remove(TimerBase &) noexcept
Removes a timer from the list.
void updateOnStart(TimerBase &)
Called by Timer when a timer is started.
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.
void add(TimerBase &, ExceptionSink)
Adds a timer. Called from the Timer constructor.
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.