Monotonic microsecond clock abstraction.
More...
#include <clock.h>
|
| virtual | ~Clock ()=default |
| | Destroys the clock. More...
|
| |
| virtual std::chrono::microseconds | Get () const =0 |
| |
| template<typename D > |
| D | Get () const |
| |
|
| static std::shared_ptr< Clock > | Create (std::uint64_t sleep_delay_us=333) |
| |
Monotonic microsecond clock abstraction.
◆ ~Clock()
| virtual quicr::Clock::~Clock |
( |
| ) |
|
|
virtualdefault |
◆ Create()
| static std::shared_ptr<Clock> quicr::Clock::Create |
( |
std::uint64_t |
sleep_delay_us = 333 | ) |
|
|
static |
Creates the default clock implementation.
- Parameters
-
| sleep_delay_us | Polling delay in microseconds. |
- Returns
- Shared clock instance.
◆ Get() [1/2]
template<typename D >
| D quicr::Clock::Get |
( |
| ) |
const |
|
inline |
Returns the current monotonic time converted to another duration.
- Template Parameters
-
| D | Target std::chrono duration type. |
- Returns
- Current time represented as
D.
◆ Get() [2/2]
| virtual std::chrono::microseconds quicr::Clock::Get |
( |
| ) |
const |
|
pure virtual |
- Returns
- Current monotonic time in microseconds.
The documentation for this class was generated from the following file: