quill
|
A utility class for accessing the Time Stamp Counter (TSC) clock used by the backend logging thread. More...
#include <BackendTscClock.h>
Classes | |
class | RdtscVal |
Public Types | |
using | duration = std::chrono::nanoseconds |
using | rep = duration::rep |
using | period = duration::period |
using | time_point = std::chrono::time_point< BackendTscClock, duration > |
Static Public Member Functions | |
QUILL_NODISCARD static QUILL_ATTRIBUTE_HOT time_point | now () noexcept |
Provides the current synchronized timestamp obtained using the TSC clock maintained by the backend logging thread. More... | |
QUILL_NODISCARD static QUILL_ATTRIBUTE_HOT RdtscVal | rdtsc () noexcept |
Returns the current value of the TSC timer maintained by the backend logging thread. More... | |
QUILL_NODISCARD static QUILL_ATTRIBUTE_HOT time_point | to_time_point (RdtscVal rdtsc) noexcept |
Converts a TSC (Time Stamp Counter) value to a wall clock timestamp. More... | |
Static Public Attributes | |
static constexpr bool | is_steady = false |
A utility class for accessing the Time Stamp Counter (TSC) clock used by the backend logging thread.
This class provides access to the TSC clock maintained by the backend logging thread, allowing for synchronized timestamp retrieval.
Other threads can obtain timestamps synchronized with the TSC clock of the backend logging thread, ensuring synchronization with log statement timestamps.
If ClockSourceType::Tsc
is not used by any Logger, this class reverts to using the system clock for providing a timestamp.
rdtsc_resync_interval
in BackendOptions
.
|
inlinestaticnoexcept |
Provides the current synchronized timestamp obtained using the TSC clock maintained by the backend logging thread.
|
inlinestaticnoexcept |
Returns the current value of the TSC timer maintained by the backend logging thread.
|
inlinestaticnoexcept |
Converts a TSC (Time Stamp Counter) value to a wall clock timestamp.
rdtsc | The TSC counter value |
0
if no Logger with a TSC clock source has been used. The TSC clock is initialized by the backend thread when the first log statement is processed, provided that a TSC-based logger is used. If the backend thread has not processed any log statements, the function may return zero.