8#include "unfair_mutex.hpp"
15class time_stamp_count;
52 static inline
std::jthread subsystem_thread;
54 static inline
std::array<
std::atomic<utc_nanoseconds>, maximum_num_cpus> tsc_epochs = {};
56 static void subsystem_proc_frequency_calibration(std::stop_token stop_token)
noexcept;
57 static void subsystem_proc(std::stop_token stop_token)
noexcept;
61 static bool init_subsystem() noexcept;
65 static
void deinit_subsystem() noexcept;
67 [[nodiscard]] static
size_t find_cpu_id(uint32_t cpu_id) noexcept;
70std::
string format_engineering(
std::chrono::nanoseconds duration);
Since Window's 10 QueryPerformanceCounter() counts at only 10MHz which is too low to measure performa...
Definition time_stamp_count.hpp:29
Timestamp.
Definition time_stamp_utc.hpp:19
static utc_nanoseconds now(time_stamp_count &tsc) noexcept
Get the current time and TSC value.
static bool start_subsystem() noexcept
This will start the calibration subsystem.
static void stop_subsystem() noexcept
This will stop the calibration subsystem.
static void adjust_for_drift() noexcept
A calibration step which will drift the per-cpu tsc-offset.
static utc_nanoseconds make(time_stamp_count const &tsc) noexcept
Make a time point from a time stamp count.