|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
high resolution timer source: an OS timer wait toward the objective, optionally handing over to yield/spin polling covering the last lead; self pacing by duration like free_run, or paced by an override's sync() More...
#include <dx_clock.h>
Public Types | |
| typedef _clock_t | clock_t |
| typedef _event_t | event_t |
Public Member Functions | |
| virtual void | sync(const typename clock_t::time_point& now) |
| super& | wait(bool reset= false) override |
Public Attributes | |
| std::atomic<dx::stream::clock::strategy> | strategy{dx::stream::clock::plain} |
| switchable at runtime: the poll modes run only what the timer left | |
Protected Member Functions | |
| bool | sleep(int64_t remaining) |
| void | wait(int64_t remaining) |
| waits the remaining ns by the strategy | |
Static Protected Member Functions | |
| static int64_t | now() |
| static void | relax(dx::stream::clock::strategy strategy) |
Protected Attributes | |
| std::condition_variable | condition_variable |
| clock_t::duration | duration{clock_t::duration::zero()} |
| _event_t | event |
| std::mutex | mutex |
| _clock_t::time_point | objective |
| std::atomic<bool> | running{false} |
| os_result | status{not_initialized} |
Friends | |
| struct | dx::stream::clock |
| its wait() takes now(), sleep() and relax() | |
high resolution timer source: an OS timer wait toward the objective, optionally handing over to yield/spin polling covering the last lead; self pacing by duration like free_run, or paced by an override's sync()
|
inherited |
|
inherited |
|
inlinestaticprotected |
|
inlinevirtualinherited |
Reimplemented from dx::source< _event_t, _clock_t >.
Reimplemented in dx::usb::clock::source< device_t >.
waits the remaining ns by the strategy
|
friend |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
| std::atomic<dx::stream::clock::strategy> dx::timer<event_t, clock_t>::strategy{dx::stream::clock::plain} |
switchable at runtime: the poll modes run only what the timer left