|
xentara-cpp-control v1.0.1
The Xentara C++ Control Framework
|
A class that provides timing information of the control task. More...
#include <xentara/TimerInfo.hpp>
Public Member Functions | |
| TimerInfo ()=default | |
| Default Constructor. | |
| TimerInfo (std::chrono::system_clock::duration period, std::chrono::system_clock::duration offset=std::chrono::system_clock::duration::zero()) | |
| Constructor. | |
| operator bool () const noexcept | |
| Checks if the control is attached to timer. | |
| auto | hasTimer () const -> bool |
| Checks if the current control task uses a timer. | |
| auto | period () const -> std::chrono::system_clock::duration |
| Gets the period for the timer if the control task is using one. | |
| auto | offset () const -> std::chrono::system_clock::duration |
| Gets the offset time for the control tasks timer. | |
A class that provides timing information of the control task.
This object is returned by InitContext::timerInfo() if the task is attached to a single timer, or by InitContext::attachedTimerInfos() for multiple timers to which the task is attached. You can also create a custom Timer information object to meet your specific requirements.
|
default |
Default Constructor.
This constructor can be used to create your own timer information object.
| xentara::TimerInfo::TimerInfo | ( | std::chrono::system_clock::duration | period, |
| std::chrono::system_clock::duration | offset = std::chrono::system_clock::duration::zero() |
||
| ) |
Constructor.
| period | The period of the timer |
| offset | The offset of the timer |
Checks if the current control task uses a timer.
| auto xentara::TimerInfo::offset | ( | ) | const -> std::chrono::system_clock::duration |
Gets the offset time for the control tasks timer.
|
explicitnoexcept |
Checks if the control is attached to timer.
| auto xentara::TimerInfo::period | ( | ) | const -> std::chrono::system_clock::duration |
Gets the period for the timer if the control task is using one.