|
join 1.0
lightweight network framework library
|
rdtsc clock policy (invariant TSC, CPU pinning, no NTP slewing). More...
#include <clock.hpp>
Public Types | |
| using | Duration = std::chrono::nanoseconds |
| using | TimePoint = std::chrono::time_point<NanoClock> |
| using | Stats = BasicStats<Rdtsc> |
| template<size_t Capacity, uint64_t TickNs = 100> | |
| using | Wheel = BasicWheel<Rdtsc, SpinPolicy<Rdtsc>, Capacity, TickNs> |
Public Member Functions | |
| Rdtsc () | |
| default constructor. | |
Static Public Member Functions | |
| static bool | invariant () noexcept |
| check if the cycle counter is invariant. | |
| static void | calibrate () noexcept |
| calibrate against CLOCK_MONOTONIC, or CNTFRQ on ARM. | |
| static TimePoint | now () noexcept |
| read the current time, requires calibrate (). | |
rdtsc clock policy (invariant TSC, CPU pinning, no NTP slewing).
| using join::Rdtsc::Duration = std::chrono::nanoseconds |
| using join::Rdtsc::Stats = BasicStats<Rdtsc> |
| using join::Rdtsc::TimePoint = std::chrono::time_point<NanoClock> |
| using join::Rdtsc::Wheel = BasicWheel<Rdtsc, SpinPolicy<Rdtsc>, Capacity, TickNs> |
|
inline |
default constructor.
| std::runtime_error | if the cycle counter is not invariant. |
|
inlinestaticnoexcept |
calibrate against CLOCK_MONOTONIC, or CNTFRQ on ARM.
|
inlinestaticnoexcept |
check if the cycle counter is invariant.
|
inlinestaticnoexcept |
read the current time, requires calibrate ().