std::chrono-style steady clock with nanosecond duration read with clock_gettime(): CLOCK_MONOTONIC_COARSE if it works on this system, otherwise CLOCK_MONOTONIC (chosen once on first use).
More...
#include <fast_monotonic_clock.hh>
|
| using | duration = std::chrono::nanoseconds |
| | Duration type: std::chrono::nanoseconds.
|
| |
| using | rep = duration::rep |
| | Tick count type of duration.
|
| |
| using | period = duration::period |
| | Tick period of duration (nanoseconds).
|
| |
| using | time_point = std::chrono::time_point< fast_monotonic_clock > |
| | Time point of this clock.
|
| |
|
| static time_point | now (clockid_t clkId=clock_id()) noexcept |
| | Return the current time of clock clkId (the selected default clock unless given), via clock_gettime(); the result is only checked by assert().
|
| |
| static duration | get_resolution (clockid_t clkId=clock_id()) noexcept |
| | Return the resolution of clock clkId (the selected default clock unless given), via clock_getres().
|
| |
|
| static constexpr bool | is_steady = true |
| | True: the clock is monotonic.
|
| |
std::chrono-style steady clock with nanosecond duration read with clock_gettime(): CLOCK_MONOTONIC_COARSE if it works on this system, otherwise CLOCK_MONOTONIC (chosen once on first use).
◆ duration
Duration type: std::chrono::nanoseconds.
◆ period
Tick period of duration (nanoseconds).
◆ rep
Tick count type of duration.
◆ time_point
Time point of this clock.
◆ get_resolution()
| auto Pds::fast_monotonic_clock::get_resolution |
( |
clockid_t |
clkId = clock_id() | ) |
|
|
inlinestaticnoexcept |
Return the resolution of clock clkId (the selected default clock unless given), via clock_getres().
◆ now()
| auto Pds::fast_monotonic_clock::now |
( |
clockid_t |
clkId = clock_id() | ) |
|
|
inlinestaticnoexcept |
Return the current time of clock clkId (the selected default clock unless given), via clock_gettime(); the result is only checked by assert().
◆ is_steady
| constexpr bool Pds::fast_monotonic_clock::is_steady = true |
|
staticconstexpr |
True: the clock is monotonic.
The documentation for this class was generated from the following file: