|
mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
Abstract interface for timer implementations. More...
#include <timer.hpp>
Public Member Functions | |
| TimerImplInterface ()=default | |
| Default constructor. | |
| virtual | ~TimerImplInterface ()=default |
| Virtual destructor. | |
| TimerImplInterface (const TimerImplInterface &)=delete | |
| TimerImplInterface & | operator= (const TimerImplInterface &)=delete |
| TimerImplInterface (TimerImplInterface &&)=delete | |
| TimerImplInterface & | operator= (TimerImplInterface &&)=delete |
| virtual void | stop ()=0 |
| Stop the timer. | |
| virtual void | start_or_reset ()=0 |
| Start the timer or reset its countdown. | |
| virtual void | set_period (std::chrono::nanoseconds period)=0 |
| Change the timer period. | |
| virtual bool | is_running () const =0 |
| Check whether the timer is running. | |
Abstract interface for timer implementations.
This interface allows the public Timer class to use different timer implementations through the Pimpl idiom.
|
nodiscardpure virtual |
Check whether the timer is running.
|
pure virtual |
Change the timer period.
| period | New timer period. |
Implementations should reset the timer when the period is changed.