8#include "unfair_mutex.hpp"
14namespace hi::inline
v1 {
15class time_stamp_count;
41 static
void stop_subsystem() noexcept;
49 static
void adjust_for_drift() noexcept;
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
std::
size_t find_cpu_id(uint32_t cpu_id) noexcept;
70std::
string format_engineering(
std::chrono::nanoseconds duration);
Utilities used by the HikoGUI library itself.
DOXYGEN BUG.
Definition algorithm.hpp:15
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 bool start_subsystem() noexcept
This will start the calibration subsystem.
static utc_nanoseconds make(time_stamp_count const &tsc) noexcept
Make a time point from a time stamp count.
static utc_nanoseconds now(time_stamp_count &tsc) noexcept
Get the current time and TSC value.